rivet Posted September 12, 2015 Posted September 12, 2015 I had a client who took extensive notes during phone calls and occasionally they would loose the notes because of an interuption between FMP client and server. To help with the issue I created a small script to auto-save the notes on a timed interval, while the field is active. In this example I have the interval set to 12 sec. and to give the user an indication of when the auto-save happens, I have scripted an apple notifcation for Mac (10.9+) users and a title bar change for PC users. -enjoy If you see any way of improving please post update sample. RIVET field auto-save v1a.zip 1
Wim Decorte Posted September 12, 2015 Posted September 12, 2015 I like the demo. But having said that; networks should be more stable than that and I would urge a lot of effort to be put in troubleshooting the network and finding the root cause instead of tackling the symptoms.
rivet Posted September 12, 2015 Author Posted September 12, 2015 actually I believe its just the client walking away from her laptop before committing the record and then the laptop goes into sleep mode.
bruceR Posted September 12, 2015 Posted September 12, 2015 Interesting. Small error in the script; you never declare $interval , so the message says this will occur "every seconds"
rivet Posted September 13, 2015 Author Posted September 13, 2015 Thanks Bruce, I fixed that and I also added a check against Get ( RecordOpenState ) to avoid the save if the record is not open. RIVET field auto-save v1b.fmp12
Newbies Chad Adams Posted September 14, 2015 Newbies Posted September 14, 2015 Nice sample file. I just did something similar for a user with an iPad who would make changes while in the field (WAN connection via cellular network), and would habitually forget to "save" his work before sleeping the iPad. I found that special consideration had to be taken for fields in portals, container fields and fields with a control style applied (like drop down calendar or pop-up menu). Have you ran into similar issues? You can see how I worked around those issues here: http://www.skeletonkey.com/ios-save-data/ I especially like your notifications. It wasn't needed in my situation, but is pretty cool none the less.
bruceR Posted September 14, 2015 Posted September 14, 2015 Here's a mod where I add conditional formatting to the time stamp filed so you can see when auto-save is turned on. And I added a refresh window action at the end of the stop start script. RIVET field auto-save v1bBFR.fmp12
Recommended Posts