When editing a live FileMaker database, we’ll sometimes need to force clients to commit their records before the update can happen. If our users are on remote machines, this can be a real problem. The general fallback approach is to send a disconnect request from the FileMaker Server. This will close the database the client is using, so it isn’t the most friendly method.
If you are a computer admin with the credentials to ssh into these remote machines, you can perform a polite Applescript that will commit the current record without most users even noticing. Simply remote connect to the machine using Terminal, then rum the following command:
osascript -e "tell application "FileMaker Pro"" -e "tell database "Products"" -e "set cr_id to current record's ID" -e "show first record" -e "show record ID cr_id" -e "end tell" -e "end tell"
In this example, I am using a database called “Products”, so please modify the script as your needs require.
This solution requires knowledge of usernames and passwords, so it is not ideal in all situations. A more integrated approach would be to add either a timer for auto commit, or using a special command in filemaker to force users to commit. I will write about both when time permits.