NetTalk Central

Author Topic: Processing history changes on an update form  (Read 3119 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Processing history changes on an update form
« on: October 01, 2012, 06:17:32 AM »
I am trying to create an audit log of changes made to a record when closing a form. In traditional Clarion this is done in ThisWindow.TakeCompleted before the Parent Call.

Where would I put my code in NetTalk to achieve the same thing. IOW the point at whch the form is actually closed for good.

Many thanks

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Processing history changes on an update form
« Reply #1 on: October 01, 2012, 10:34:29 PM »
The form procedure is called many times, so as a procedure it "closes for good" many times as well.

For auditing, it would depend a lot on how you plan to audit. The ValidateRecord routine contains the record primed for saving (but not yet save). The PostUdate / PostInsert etc contain the record after being saved.

If you wanted to "cache" a copy of the record when the form opens, I'd likely do that in the PreUpdate routine.

cheers
Bruce


John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Processing history changes on an update form
« Reply #2 on: October 01, 2012, 10:47:59 PM »
Thanks Bruce.

You probably second guessed I will be using HISTORY: at the start and then comparing after insert/update so this sounds perfect.

Still difficult to stop thinking in "traditional" Clarion terms and switch over to the transaction type processing.

Many thanks

John