According to your problem...........
Just write a script ....
show custom dialog box: Are u want to save/commit
if yes then commit record/request
revert record /request
This must be attached by script trigger (on record commit)
You must check the box: save record changes automatically from layout setup.
This'll perform after u entered values in the field then click on outside the field
If u want to perform this after the value entered in the last field on the layout then
create a button(Say save) which attached by trigger (on record exit) by a script only commit record/request.
I hope this'll bring ur Ans
A script triggered by OnRecordCommit executes before the record is actually committed. Thus, all you need to do is exit the script without actually committing the record:
Exit Script [False]
will do that.
All "before event" triggers can be canceled in this fashion
If you look up "Setting up script triggers" in FileMaker help, you'll find a table listing all triggers and which are "before" triggers.
Thank you for your clear info. I follow your suggestion. It works on the Commit. But not Revert. Here is my result.1. I have two bottoms which execute Commit and Revert script directly.2. I trig scripts by OnRecordCommit and OnRecordRevert.3. Both SKU_FormCommit and SKU_FormRevert script is exact same - ask to save/revert or not. And my result is below.For the Commit:Record data was "111". I changed it to "222". When I click "Save" bottom, the record data on the screen is still "222". System jumps into my commit script and asks save or not. The script "Exit Script [result:False]" and Exit Script [result:True]" work exact what I want.For the Revert:Record data was "111". I changed it to "222". When I click "Revert" bottom, the record data on the screen changes to "111" right away before system jumps into my revert script and asks revert or not. The script "Exit Script [result:True]" reverts the data to "111". And "Exit Script [result:False]" keeps the data on the screen as "111".My question: Should the screen be "222" when I click "revert" and when I "Exit Script [result:False]"?
Exit Script [False]
there is no need to revert the record as it is never committed.
I ran across this post while attempting to use the onRecordCommit technique in Filemaker 13 to prevent records from being changed after a supervisor has closed the record to changes. Despite the insistence of this post and the Filemaker documentation, I could not make the record not commit with a simple "Exit Script [Result: False]" step following the test. I had to put in the "Revert Record/Request" step instead in order to get out of the record. Without the "Revert Record" step, the layout remains locked on the record and the user continually gets the warning message from my onRecordCommit script that they are not allowed to change the record.
Am I overlooking something? The results are still as expected - the record is not allowed to be changed. But what I had to do to make that happen doesn't match with any information I can find in documentation or online.