Custom Web Publishing Guide

Table Of Contents
98 FileMaker Server Advanced Custom Web Publishing Guide
–script.prefind.param (Pass parameter to Script before Find) query parameter
Passes a parameter to the FileMaker script specified by –script.prefind
Value is: A single text parameter.
1 To pass in multiple parameters, you can create a string delimiting the parameters and have your script
parse out the individual parameters. For example, pass “param1|param2|param3” as a list with the “|
character URL-encoded as this:
param1%7Cparam2%7Cparam3
1 To treat the text parameter as a value that is not text, your script can convert the text value. For example,
to convert the text value to a number, your script could include the following:
GetAsNumber(Get(ScriptParam))
1 If your query contains –script.prefind.param without –script.prefind, then –script.prefind.param is ignored.
1 If your query contains more than one –script.prefind.param, then the Web Publishing Engine uses the last
value that it parses.
Optional with: –script.prefind
Example:
http://192.168.123.101/fmi/xml/fmresultset.xml?–db=employees&–lay=departments&–script.prefind=myscript
&–script.prefind.param=payroll&–findall
–script.presort (Script before Sort) query parameter
Specifies the FileMaker script to run after finding records (if specified) and before sorting records during
processing of the
–find query command
Optional with: all query commands except –dbnames, –layoutnames, –process, and –scriptnames
Example:
http://192.168.123.101/fmi/xml/fmresultset.xml?–db=employees&–lay=departments&–script.presort=myscript
&–sortfield.1=dept&–sortfield.2=rating&–findall
–script.presort.param (Pass parameter to Script before Sort) query parameter
Passes a parameter to the FileMaker script specified by –script.presort
Value is: A single text parameter.
1 To pass in multiple parameters, you can create a string delimiting the parameters and have your script
parse out the individual parameters. For example, pass “param1|param2|param3” as a list with the “|
character URL-encoded as this:
param1%7Cparam2%7Cparam3
1 To treat the text parameter as a value that is not text, your script can convert the text value. For example,
to convert the text value to a number, your script could include the following:
GetAsNumber(Get(ScriptParam))
1 If your query contains –script.presort.param without –script.presort, then –script.presort.param is ignored.
1 If your query contains more than one –script.presort.param, then the Web Publishing Engine uses the last
value that it parses.
Optional with: –script.presort
Example:
http://192.168.123.101/fmi/xml/fmresultset.xml?–db=employees&–lay=departments&–script.presort=myscript
&–script.presort.param=18%7C65&–sortfield.1=dept&–sortfield.2=rating&–findall