Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4828 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

FM 11 Adv. I don't understand when the Commit records script step should be used. Can anyone explain this?

Posted

Whenever a record is being edited, FileMaker locks it so that no other users can change it at the same time. The commit steps tells FMP to check that the edits are valid (based on the field-level validation rules that have been defined) then save the changes and un-locks the record so somebody else can have a turn.

So basically, in every script you should explicitly commit the record when finished editing the record. There are some steps that implicitly commit the record -- changing to another record and changing layout are two -- but it's good habit to do so yourself.

You should also trap for commit errors. Records won't commit if the validation fails: say if it's a duplicate value (or empty) in a field that has been defined to be unique (or not empty).

Record commit is important even if the solution in not intended to be used with multiple users: a record lock can occur when multiple windows are showing the same record and the record is being edited in one of them. (This caught a lot of developers when FMP 7 first released, it was the first version that allowed multiple windows of the same table to be open.)

BTW also read up on the Open Record script step, it's used to work out whether a record is locked.

This topic is 4828 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.