Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5739 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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 by Guest
Posted

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.

Posted

Is this file hosted by FMS10? If so, you could schedule this script to run whenever the source file is available.

Posted (edited)

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 by Guest
Posted (edited)

Huh? You shouldn't put a FM file on anything but a FMS or host it from a workstation.

Edited by Guest
Posted

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.

Posted

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.

This topic is 5739 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.