audit record

For HanDBase related topics that are not specific to one platform.

audit record

Postby Reggae » Wed Apr 07, 2010 5:19 am

Hi,

I have a database and I wish to maintain an audit of changes I make to it by having a child audit database. The parent table contains a number of DBPopup field types all of which I want to appear in the audit DB as well as the parent.

I have a link established between the two databases but I am struggling with finding a way to copy through the fields from the parent to the child record, other than the field that links them, when I add a new audit record.

I hope I've explained this clearly and look forward to any suggestions anyone might have.

Thanks

Reggae
Reggae
 
Posts: 26
Joined: Tue Oct 06, 2009 3:37 am

Re: audit record

Postby dhaupert » Wed Apr 07, 2010 11:11 am

Hi

The way to do this is through relationship fields. You define a new relationship field in the Audit database, and point it to the linked field in that database, and the link field in the parent database. Those two connect via the same key which is stored internally. Then you can show the value from whatever field you want in that database.

Remember, these relationship fields are live fields, and will change as the fields in the parent database change. So if you're hoping to get a 'snapshot of the values' before a change as part of your audit, that may not do the job!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: audit record

Postby Reggae » Thu Apr 08, 2010 4:48 am

Thanks Dave - thats brilliant. Its doing exactly what I want now.
Reggae
 
Posts: 26
Joined: Tue Oct 06, 2009 3:37 am


Return to HanDBase General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron