Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Last night I shut down FMP without issues. However this morning I discovered one of my scripts which checks Get ( RecordOpenState ) was set greater than zero.

Not knowing in which table the unsaved record was located I built a script to loop through all records in all tables and commit each record without dialogue. Nevertheless FMP interrupted the script asking whether to save the record.

Is there a better technique to ensure all records are properly handled should FMP crash with a power outage? Unsaved records must surely occur now and again.

Recommendations?

Posted

The (RecordOpen) function returns:

0 for a closed or committed record

1 for a new record that hasn’t been committed

2 for a modified record that hasn’t been committed

It is not a count. What are you trying to do here?

Steven

Posted

The (RecordOpen) function returns:

0 for a closed or committed record

1 for a new record that hasn’t been committed

2 for a modified record that hasn’t been committed

It is not a count. What are you trying to do here?

Steven

If [ get (openrecordstate) > 0

then the user has not pressed the "save" button provided on the layout. Therefore they should not be allowed to leave the current layout until they have done so.

I was startled that, during my coding, FMP successfully closed down without a warning. While I don't expect in normal end user use of this solution they can get past the above If statement, I'd now like to provide a safety net should exceptions turn up.

With appreciation.

Posted

What does you save button do?

Normally, the user has only to click on the background of a layout, change mode or change record to commit the current record. This has the effect of saving it. There is no need for a "save" button.

This topic is 5641 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.