Custom Web Publishing with XML and XSLT

Table Of Contents
22 FileMaker Server Custom Web Publishing with XML and XSLT
FileMaker scripts and Custom Web Publishing
The ScriptMaker
feature in FileMaker Pro can automate frequently performed tasks, combine several
tasks. When used with Custom Web Publishing, FileMaker scripts allow web users to perform more tasks
or a series of tasks.
FileMaker supports about 70 script steps in Custom Web Publishing. Web users can perform a variety of
automated tasks when you use scripts in a query string for a URL or in a <?xslt–cwp–query?> processing
instruction in an XSLT stylesheet. To see script steps that are not supported, select the Indicate web
compatibility checkbox in the Edit Script window in FileMaker
Pro. Dimmed script steps are not supported
on the web. For information on creating scripts, see FileMaker
Pro Help.
Script tips and considerations
Although many script steps work identically on the web, there are several that work differently. See “Script
behavior in Custom Web Publishing solutions” on page 23. Before sharing your database, evaluate all
scripts that will be executed from a web browser. Be sure to log in with different user accounts to make sure
they work as expected for all clients. Check the Web Publishing Engine application log file
(pe_application_log.txt) for any scripting-related errors; for more information, see
“Using the Web Publishing
Engine application log” on page 84.
Keep these tips and considerations in mind:
1 Use accounts and privileges to restrict the set of scripts that a web user can execute. Verify that the scripts
contain only web-compatible script steps, and only provide access to scripts that should be used from a
web browser.
1 Consider the side effects of scripts that execute a combination of steps that are controlled by access
privileges. For example, if a script includes a step to delete records, and a web user does not log in with
an account that allows record deletion, the script will not execute the Delete Records script step.
However, the script might continue to run, which could lead to unexpected results.
1 In the ScriptMaker Edit Script window, select Run script with full access privileges to allow scripts to
perform tasks that you would not grant individuals access to. For example, you can prevent users from
deleting records with their accounts and privileges, but still allow them to run a script that would delete
certain types of records under conditions predefined within a script.
1 If your scripts contain steps that are unsupported, for example, steps that are not web-compatible, use the
Allow User Abort script step to determine how subsequent steps are handled.
1 If the Allow User Abort script step option is enabled (on), unsupported script steps stop the script from
continuing.
1 If Allow User Abort is off, unsupported script steps are skipped and the script continues to execute.
1 If this script step is not included, scripts are executed as if the feature is enabled, so unsupported script
steps stop scripts.
1 Some scripts that work with one step from a FileMaker Pro client may require an additional Commit
Record/Request step to save the data to the host. Because web users don’t have a direct connection to the
host, they aren’t notified when data changes. For example, features like conditional value lists aren’t as
responsive for web users because the data must be saved to the host before the effects are seen in the
value list field.