sandyinlet Posted August 10, 2009 Posted August 10, 2009 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?
Steven H. Blackwell Posted August 10, 2009 Posted August 10, 2009 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
sandyinlet Posted August 11, 2009 Author Posted August 11, 2009 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.
Vaughan Posted August 12, 2009 Posted August 12, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now