Database Reference
In-Depth Information
In addition, there are some caveats you should be aware of before you run any script on the
server. Obviously, the database must be hosted on FileMaker Server before you use this step
(see FileMaker Server for details). Second, scripts that are performed on the server run with
the access of the user who runs the script. So make sure users who will initiate server-run
scripts have the appropriate security access ( Scripts and Security ) to everything the script
needs to do its work. Third, server-side scripts don't have the same context as client-run
scripts. So scripts that will be performed on the server may need to go to specific layouts;
find, sort, or activate records; or do other preparations that a client-side script might not re-
quire.
There are a few things that can make a server-run script fail:
▪ The script is run while the file is not hosted—say if you were trying to test it on a local
computer or if the file is stored on an iOS device.
▪ Server-run scripts don't have access to global variables unless they're set in the script it-
self.
Perform Script on Server is compatible only with FileMaker 13. So the script step
will fail if it's run by any client older than FileMaker 13.
Perform Script on Server doesn't work in peer-to-peer sharing ( Understanding Data-
base Sharing ) .
▪ A Perform Script on Server step won't run in a Scheduled script ( Administering
FileMaker Server ) .
Waiting for Script Results
The Perform Script on Server step gives you two options. As with the regular Perform
Script step, you can select the script you want to run. You can also decide whether the cli-
ent machine waits for the script to finish before proceeding. Scripts that don't have the “Wait
for completion” option turned on can't return results to client machine that initiated the
script, so make sure you only use this option if the user (or the script itself) doesn't care what
happens after the processing is done. For example, you might want your database to do some
housekeeping tasks after everyone has gone home, but you don't have specific quitting times,
so you can't just schedule the script to run on the server at a specific time. In that case, the
last person leaving could click a button to start the housekeeping script and then shut his
computer down. Just make sure the script doesn't need input from users before it finishes up.
Search WWH ::




Custom Search