Database Reference
In-Depth Information
were set in, so you can stop an out-of-control OnTimer script by closing its window. More
commonly, though, you'll stop an OnTimer script by installing a second one that doesn't ac-
tually call another script or express an interval. This technique clears the timer and stops the
first script.
NOTE
This chapter's finished sample file has a layout called Customer [OnTimer script] that demonstrates
the technique of installing and uninstalling an OnTimer script. It uses the Set Variable script step,
which is a mainstay of dynamic script writing. You learn how it works on Using a Variable to Create
Dynamic Find Requests .
Running Scripts on the Server
FileMaker Pro is a robust program that can whip through complex scripted tasks quickly and
efficiently. Because FileMaker Go ( Server Hardware ) runs on a device with a lot less power
than a desktop, it's similarly less powerful. So you should tailor FileMaker Go's scripted
tasks accordingly. Sometimes though, you need to let a mobile user run a heavy-duty pro-
cess. In that case, you can use the Perform Script on Server step to shift the heavy lifting
back to the server. But you might also want to off-load some tasks to the server to let even
desktop users click a button and then return to their own work without waiting for a script to
finish. Server-run scripts support script parameters ( Script Parameters ) and can return results
( Copying and Editing Existing Script Steps ) .
You may be tempted to start shifting all the work to your server, but on a fast network with
modern computers, the desktop will handle most tasks as quickly as the server can. Plus, if
you have a lot of users, or if your database has a lot of scripts, you could overload the server.
FileMaker Server is multi-threaded, but even a fast server with multiple processors some-
times has to queue up tasks under heavy loads. Here are some places where a server script
may run a script faster than a client script:
▪ Creating, editing, or deleting large numbers of records (including using Replace Field
Contents).
▪ Summarizing large data sets into variables or using summary fields.
▪ Using the ExecuteSQL() function for large groups of records or across many related
tables.
▪ Searching on unindexed fields ( Manual Indexing ).
Search WWH ::




Custom Search