Custom Web Publishing with XML and XSLT

Table Of Contents
102 FileMaker Server Custom Web Publishing with XML and XSLT
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
–skip (Skip records) query parameter
Specifies how many records to skip in the found set
Value is: A number. If the value is greater than the number of records in the found set, then no record is
displayed. The default value is 0.
Optional with: –find query command
In the following example, the first 10 records in the found set are skipped and records 11 through 15 are
returned.
Example:
http://192.168.123.101/fmi/xml/fmresultset.xml?–db=employees&–lay=departments&–skip=10&–max=5&–findall
–sortfield (Sort field) query parameter
Specifies the field to use for sorting
Value is: field name
Optional with: –find or –findall query commands
The –sortfield query parameter can been used multiple times to perform multiple field sorts. The syntax for
specifying the precedence of the sort fields is:
–sortfield.precedence-number=fully-qualified-field-name
where the precedence-number in the –sortfield.precedence-number query parameter is a number (starting with
1) that specifies the precedence to use for multiple sort fields.
In the following example, the dept field is sorted first, and then the rating field is sorted. Both fields are sorted
in ascending order because the –sortorder query parameter is not specified.
Example:
http://192.168.123.101/fmi/xml/fmresultset.xml?–db=employees&–lay=performance&–sortfield.1=dept
&–sortfield.2=rating&–findall