Jump to content
beju0506

"History" functionality for DB, plugins?

Recommended Posts

beju0506

Hello All,

 

I spoke briefly with a few people on here before I believe about "history" type functionality for the DB (where once a record is deleted, it isn't really deleted but converted to inactive and "hidden" from normal view). Someone (I think it may have been Ender) suggested that we do it via filtering in the joins on a particular status field. This works really well, but as our database is quite large now, it could potentially take months to do this... another suggestion I heard was to have permissions set on accounts to filter out certain records. This works well too, except it says "no access" on records that are "inactive", and in order to view the "inactive" records, one would need to log in under a different account name. Does anyone know of any plugins that do this sort of thing? I mean, store away deleted records in another table or DB or something? Otherwise this will eat up a HUGE amount of time on this project...

 

Thanks in advance,

 

Justin

FM Novice

Share this post


Link to post
Share on other sites
aaa

Hi, beju0506!

One of ways may be import deleted records to other table and delete it from main table. It can be by script, which works when opens DB or when record is deleting, in deleting script.

Share this post


Link to post
Share on other sites
Ender
One of ways may be import deleted records to other table and delete it from main table. It can be by script, which works when opens DB or when record is deleting, in deleting script.

I would advise against such a process. It's too easy for something to go wrong in the import process.

 

For example, if a field is deleted in the source or destination table, the import mapping can get messed up. In such a scenario, you won't get an error when you run the import, but the data will end up in the wrong fields. This type of problem could go unnoticed for a while, and in the mean time, the original data has been deleted. It's difficult to clean up this type of problem.

Share this post


Link to post
Share on other sites
beju0506

Yes, we had tried that once before and the importing/exporting got a little wacky... i.e. loss of data, etc. I was kinda hoping for a plugin or something that would do it automatically lol... I suppose that is a pipe dream :(

It is just such a pain to make duplicates of all TO's (one for "active" items and one for "inactive" items) in order to properly display them. I would just create a duplicate layout for inactive items except that we want to show inactive joins as well... basically like a "shadow" database that maintains the links between inactive items. i.e. once the active items are changed to inactive, the joins are changed as well and the whole relationship is shown in a duplicate layout (or the same layout) so that the entire inactive record and relationships to other records is preserved. I dunno... any suggestions? or should I just tough it out and do it the hard way?

Share this post


Link to post
Share on other sites
Ender

Duplicate TOs may only be necessary if you need to see each Status' records at the same time. If you only need to see "Active" or "Inactive" or "All", this can be done through one relationship, filtered by the global Status field on the parent side, and a calc like this on the child side:

 

Status_Link (calculation, text result) = Status & "¶All"

 

Anyway, in my modules that have Status fields, I haven't found it necessary to add duplicate TOs for the whole structure, just for those key relationships where the filtering is necessary, and occasionally a duplicate of another TO hanging off the other side to see a table another hop away.

Share this post


Link to post
Share on other sites
beju0506

Ender-

 

As always I am amazed at your solution... Thats exactly what we need. I'm going to try it out right away... if I can get this to work it will save me literally months of effort.

 

Thank you to infinity,

 

Justin

Share this post


Link to post
Share on other sites
beju0506

Ender-

 

Your solution worked fantastically and is WAY easier to implement than the previous version I had been creating. Thanks again!

 

-Justin

Share this post


Link to post
Share on other sites
Ender

Glad it's working for you.

Share this post


Link to post
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use