Angus McKinnon Posted November 13 Posted November 13 I've got a persistent problem with the FM solution I maintain. It's used to manage an equipment hire company, so we have a couple of client machines at opposite ends of the warehouse, as well some in the offices upstairs. What's happening is warehouse staff are frequently making changes to records, but not committing their changes. Sometimes as simple as changing a status field when checking a returned hire in. Of course, that's a problem when someone in the office needs to access that record, and can't. Or if a machine crashes (hours or days later) and the changes are lost. I'm trying to add script triggers to fields etc. to automatically commit a record when key changes are made, but we're still finding instances when records are left with open changes. What I'm wondering is if I can run some sort of scheduled script to force-commit records that have been left idle for a certain length of time, or if there could be a way for one client to force-commit records on another client, rather than have to send a message and hope someone is standing near enough to the warehouse machine to notice.
comment Posted November 15 Posted November 15 It is difficult to recommend a specific solution without a thorough understanding of your users workflow. If you do a search for something like "Filemaker force commit idle" you will see that most often the suggestion is to install an OnTimer script that will commit the record periodically. You will also see cases where such solution interferes with user action, e.g. throwing user out of a field while editing it. I would lean towards bypassing the problem by scripting the user actions as much as possible. To take your example of: On 11/14/2025 at 1:16 AM, Angus McKinnon said: changing a status field when checking a returned hire in such change could be performed by clicking a button without the user entering the field at all.
Ocean West Posted November 19 Posted November 19 If you are open to using MBS plugin you can use the function MBS(FM.RunScriptIdle ; 90 ; Get(FileName) ; "onIdle Trigger" ) It looks for when the user is idle for 90 seconds, it will run a script. The script checks for Get(RecordOpenState) > 0 . If it is uncommitted, it will commit the record. I also have it so that when the user logs in, record a session timestamp. When it runs, it also checks to see if the current timestamp is +9 hours after they logged in it will (using mbs dialogs function) ask if they wish to continue; other wise it will time out and exit the application. Good way to kick off users who leave the system open and leave for the day.
Recommended Posts
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