I have a FM DB that only my wife and I use. It is used either on our iMac or our Macbook.
The DB is saved in iCloud so it is available on both but I need to close one (Exit Application) before opening on the other so that they remain in sync. Any changes are reflected on the iCloud version only when the DB exits.
Using Filemaker server is too expensive.
The DB opens on a layout « Home Page ». We navigate to other layouts from there (New client, new booking etc.)
I used a script trigger OnTimer on the « Home Page » to run a script « Exit App » after a set time. So if we forget to close the DB…
However I thought I read that the OnTimer script would stop when the layout was closed but when I open another layout (New client etc) it continues it’s countdown. I also considered putting another OnTimer script trigger on all the other layouts « after nn seconds open layout « Home Page » which would trigger the exit app close script but if that is counting down it won’t work!
As weIl I wanted to do a backup when the DB is closed. Looking through FM help I saw this:
Define a global field called Count Field in one of the tables in your database.
Set Field [<table name>::Count Field; <table name>::Count Field + 1]
If [<table name>::Count Field > 4]
Save a copy as ["Backup Copy.fmp12"; copy]
Set Field [<table name>::Count Field; 0]
Backs up the DB every 5th close.
I’m stuck on resolving the OnTimer continuing and how to integrate that with a Backup.
I’d appreciate any guidance.