'hide' fields?

Results 1 to 3 of 3

Thread: 'hide' fields?

  1. #1
    Join Date
    Dec 1969

    Default 'hide' fields?

    I'm making a work request database for a queue manager here. She's a blonde, so I need a way for her to be able to'undelete' a work request that she may have deleted by mistake. Just kidding, mostly, she does want some way to 'undelete' a record if she finds out she mistakingly deleted it. Is there a way to 'hide' records by tagging it as 'deleted'? I guess I could change the Status to Deleted and don't show it on any of the views, that way she can always change it back to something else, but if there are other ways to do this, let me know.

  2. #2
    Join Date
    Dec 1969

    Default RE: 'hide' fields?

    Put a RecordStatus field in your dB with a field type of bit, set it equal to zero for inactive or 1 for active (sqlserver) if she wants to "delete" a record, just update the row and set the RecordStatus field to zero, and vice versa if she wants it reactivated<BR><BR>mj

  3. #3
    Jeremy_D Guest

    Default RE: 'hide' fields?

    The "Deleted" bit column is a proven method, but if she&#039;s really blonde, she might just hit that &#060;Clean up database&#062; button (which really deletes all the deleted rows) a bit too often.<BR><BR>I would recommend adding a datetime column instead of a bit column. Keep the field NULL for all records. As soon as one gets deleted, you enter the date/time of deletion in that field. Now, whenever the user hits the &#060;Clean up database&#062; button, you only delete the rows in which date in the "Deleted" datetime column is later then the current date minus a week (or minus a month, depending on transaction-volume and &#039;blondeness&#039; of the user). That way, even after the user hits the clean up button, you can still retrieve the rows that were only deleted a short while ago.<BR><BR>Cheers,<BR>Jeremy_D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts