Custom Web Publishing with XML and XSLT

Table Of Contents
Chapter 3
|
Preparing databases for Custom Web Publishing 23
1 Any script that modifies data should include the Commit Record/Request step, because data changes
aren’t visible in the browser until the data is saved or “submitted” to the server. This includes several script
steps like Cut, Copy, Paste, and so on. Many single-step actions should be converted into scripts to include
the Commit Record/Request step. When designing scripts that will be executed from a web browser,
include the Commit Record/Request step at the end of a script to make sure all changes are saved.
1 To create conditional scripts based on the type of client, use the Get(ApplicationVersion) function. If the
value returned includes “Web Publishing Engine” then you know that the current user is accessing your
database with Custom Web Publishing. For more information on functions, see FileMaker
Pro Help.
1 If you are using a script in an XSLT stylesheet that sets or modifies a state, you must use the FileMaker
Server Admin Console to enable the XSLT Database Sessions option for the Web Publishing Engine.
Otherwise, states are not maintained between requests. See FileMaker
Server Help.
Script behavior in Custom Web Publishing solutions
The following script steps function differently on the web than in FileMaker Pro. For information on all
script steps, see FileMaker
Pro Help.
Script step Behavior in Custom Web Publishing solutions
Perform Script Scripts cannot perform in other files, unless the files are hosted on FileMaker Server and
Custom Web Publishing is enabled in the other files.
Exit Application Logs off web users, closes windows, but does not exit the web browser application.
Allow User Abort Determines how unsupported script steps are handled. Enable to stop scripts from
continuing, and disable to skip unsupported steps. See
“Script tips and considerations” on
page 22 for more details.
Web users cannot abort Custom Web Publishing scripts, but this option allows unsupported
script steps to stop the script from continuing.
Set Error Capture This is always enabled with Custom Web Publishing. Web users cannot abort Custom Web
Publishing scripts.
Pause/Resume script Although this script is supported in Custom Web Publishing, you should avoid using it.
When a Pause step is executed, the script pauses. Only a script containing the Resume script
step can make it resume execution. If the script remains in a paused state until the session
times out, then the script will not be completed.
Sort Records A specified sort order must be saved with the script step to execute in Custom Web Publishing.
Open URL This script step has no effect in a Custom Web Publishing solution.
Go to Field You cannot use Go to Field to make a particular field active in the web browser, but you can
use this script step in conjunction with other script steps to perform tasks. For example, you
can go to a field, copy the contents, go to another field and paste the value. To see the effect
in the browser, be sure to save the record with the Commit Record script step.
Commit
Record/Request
Submits the record to the database.