Timestamp script problem
I've got two timestamps in one table. One created automatically for any modification and another created via a script for when a button is clicked to approve the record (button access controlled via UAC). Both timestamps work fine.
Now, I'm trying to write a simple script via a trigger that runs whenever the modification timestamp changes. I want it to compare the modification timestamp to the approval timestamp and if it is after the approval, then I want it to clear two fields (ApprovedBy and ApprovalDate), and possibly replace the ApprovedBy field with some text like "Requires reapproval."
I can't get anything to work. Here's the basic script:
If [Activity::ModificationTimeStamp > Activity::ApprovalTimeStamp]
Set Field [Activity::ApprovedBy; ""]
Set Field [Activity::ApprovalDate; ""]
I used the Set Field function rather than Clear function as previous advice on this forum recommended that.
I tried it on both OnObjectModify and OnObjectSave, and nothing.
What am I doing wrong?