March 6, 200916 yr Is it possible to run a script on start-up of FM? I am not able to find a script helper.
March 6, 200916 yr File>File Options will run a script when the file opens, which isn't exactly the same as when FM opens, but it's what you probably mean. Edited March 6, 200916 yr by Guest
March 6, 200916 yr Author Well i have a script set to delete inventory records and import a new list of records to be used in fields on specific layouts to select from. all it does it update the inventory inside FM from an external source controlled by mgnt. When they run in the morning I want it to run automatically so they dont have to mess with it.
March 6, 200916 yr Is this file hosted by FMS10? If so, you could schedule this script to run whenever the source file is available.
March 6, 200916 yr Author Wouldnt that mean it would constantly loop all day or just one instance when they start up
March 6, 200916 yr Just when the file opens. How is it served? Peer-to-peer, hosted? If hosted, you'd schedule the script to run at a given time you specify. Edited March 6, 200916 yr by Guest
March 6, 200916 yr Huh? You shouldn't put a FM file on anything but a FMS or host it from a workstation. Edited March 6, 200916 yr by Guest
March 7, 200916 yr As B. pointed out, you should never share a FileMaker file via OS sharing. Only share it using FileMaker's sharing options. That said: What you might do is keep a one-record preferences table with a "last updated" date field. Put this at the top of your import script: If ( dateField = Get( CurrentDate ) ) Exit Script Else Set Field( dateField ; Get( CurrentDate ) ) End If That's not bulletproof but should get the job done. I.e., it will only run once a day. Go to File > File Options and choose the script to run when the file opens. Done.
March 9, 200916 yr Author The file is only used for reporting and only used by one person at any one time. Right now it works great the way we have it. I can access the file from any computer with FM on it which is all we need. The inventory .xls file is in the same folder and updated another way but need to import daily. RIght now the script works it updates the inventory fields. My only issues is the fields getting updated are the previous records from the previous day. So when originally had 10 and now has 5 the first record shows the 5 not the 10.
Create an account or sign in to comment