August 10, 200916 yr 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?
August 10, 200916 yr 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
August 11, 200916 yr Author 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.
August 12, 200916 yr 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.
Create an account or sign in to comment