What version of FM are you using? If 10, then you can use a script trigger to set the variable. If not, then you can script going to a record ans set it there.
FM 10 Pro Advanced on a Mac running 10.5.7.
That would work if I knew which field was changed. However, I have no idea which field, if any, will be changed. I might just look at a record and then do a find to go to the next record I need to review. Can you have a script trigger that's called when no data is changed or field altered?
Getting closer. OneRecordLoad puts the current record ID into the global variable, not the ID of the record I am leaving.
Since I may not be changing the record I am leaving, none of the other Layout script triggers do the job.
OnRecordLoad works fine. You just need to set the current record to a global and another global for the previous record.
Set Variable [$$Prev; $$Current ]
Set Variable [$$Current; pk_Record_ID ]
Of course you would have to tweak this for your scenario and most likely will have to capture what table it is for as well.