Query Parameters for XML/XSLT URL Requests

The FileMaker Web Publishing Engine delivers XML data in response to specially formatted URLs. The specific details of the request are contained in the query string, which is a specific portion of the URL. For example, the query string is highlighted in the following URL:


The query string consists of a series of name-value pairs, of the form name=value, separated by ampersands, and following a question mark within the URL.

Generally, a query string intended for the Web Publishing Engine consists of a single query command, representing the type of request being made, supported by additional query parameters that add specificity to the request. In the preceding example, the request is findall (find all records). Additional query parameters specify the database, the layout, and the maximum number of records to be returned.

Please note the following important points about URL queries.

  • Each URL query string must contain one and only one query command (though it may contain many additional query parameters).
  • Query commands and query parameters begin with a hyphen (-). Omitting the hyphen will cause an error.
  • A query command is expressed as a plain name, not as a name-value pair. Any supplied value will be ignored. (So you can say ...&-findall=somevalue, but the =somevalue will be ignored.)
  • The names of FileMaker fields, when included in the URL for purposes of searching, or creating or editing records, do not require a hyphen.
  • Most query commands have a minimum set of query parameters that must also be provided in the URL. These are noted in the tables below.

Query Commands

This section lists the possible query commands. If the command requires certain specific additional parameters, those are listed.


Parameters Required




Returns a list of all databases on the given server that are enabled for XML or XSLT publishing.



-db, -lay, -recid

Delete the record with the specified recid from the specified database. (The affected table is determined by the specified layout.)



-db, -lay, -recid

Duplicate the record with the specified record ID from the specified database. (The affected table is determined by the specified layout.)



-db, -lay, -recid, field name(s)

Edit the record with the specified recid from the specified database. (The affected table is determined by the specified layout.) Field names and associated field values determine what data gets written into the record.



-db, -lay, field name(s)

Find a record in the specified database and table, with search criteria determined by the supplied field data.



-db, lay

Find all records in the specified database and table.



-db, -lay

Find a random record in the specified database and table.




Returns a list of all layout names from the specified database.



-db, -lay

Create a new record in the specified database and table. If field names and field values are also supplied, these will create specific data values in the new record.




XSLT only. This command instructs the Web Publishing Engine to process a stylesheet without performing any database transactions.




Returns a list of the names of all scripts in the specified database.



-db, -lay

Used with the FMPXMLLAYOUT grammar, -view retrieves layout information in the FMPXMLLAYOUT format. Used with the other grammars, it retrieves the database metadata and an empty result set.


Query Parameters

Parameter Name

Required Value(s)



Name of a database (without file extension)

Specify a database as a target of the URL command. Most commands require this parameter.



US-ASCII, ISO-8859-1, ISO-8859-15, ISO-2022-JP, Shift_JIS, UTF-8

XSLT only. Specify the text encoding for an XSLT request. This governs only the encoding of the request, not of the output page. Encoding for the output page is set within an XSL stylesheet using the "encoding" attribute of an element.



Name of a container field

Specify a container field from which to extract data.


Name of a non-container field

Used to specify search parameters (with a find command) or data values to be inserted (with the edit and new commands).














(begins with)

(ends with)

(greater than)

(greater than or equal)

(less than)

(less than or equal)

(not equal)

Specify a search comparison operator to use when searching on . Used with the find command.



One of the four FileMaker XMLgrammars

XSLT only. Specify the grammar in which the XML data should be passed to the XSL stylesheet.



Name of a layout in the database specified by the db parameter

Required by many commands. Note that the choice of layout also governs which table the command is performed against.



Name of a layout in the database specified by the db parameter

You may wish to return data from an alternate layout. For example, you may wish to search on a particular field (in which case that field must be present on the layout specified by lay), but not return that field in the result set (in which case you would return XML from the layout named in lay.response, which would not contain the field in question).



and or or

Specifies whether the criteria in a find request represent an "and" search or an "or" search. (The default is "and".)



A positive number, or the value "all"

For a find or findall request, specifies how many records to return.



A FileMaker modification ID

Use with the edit command to specify a valid modification ID for the record being updated. If the modid value does not match the target records modification ID, the edit will be rejected. This is to ensure that the record has not been modified by someone else since the time it was fetched for a web user.



A FileMaker record ID

The edit, -dup and delete commands need to know the ID of a specific record on which to operate. Generally this record ID will be extracted from the result of a previous request. The recid parameter can also be used with the find command.



The name of a script in the database specified by the db parameter

Specifies a script to be run after the query and any sorting are performed. Make sure you understand the issue of web compatibility for scripts when using this parameter.



Value of a script parameter to be passed to the script named in script

The script named in script may be passed a script parameter.



The name of a script in the database specified by the db parameter

Specifies a script to be run before the specified query is run and sorted.



Value of a script parameter to be passed to the script named in script.prefind

The script named in script.prefind may be passed a script parameter.



The name of a script in the database specified by the db parameter

Specifies a script to be run after the specified query is run and before the results are sorted.



Value of a script parameter to be passed to the script named in script.presort

The script named in script.presort may be passed a script parameter.



A number of records to skip

Based on this value, the Web Publishing Engine will skip some of the records normally returned by a query and begin returning records from later in the result set.



Name of a field to sort on, along with a sort precedence from 1 to 9

Using the values sortfield.1 through sortfield.9, its possible to specify up to nine fields on which to sort. The precedence value is mandatory, even for a single sort criterion.



ascend, descend, or a value list name

Specify a sort order for a specific sort field.



Path to a client-side stylesheet

This will cause the output document to contain XML processing instructions that link to a CSS or XSLT stylesheet. The stylesheet name must end in .css or .xsl. Used in conjunction with styletype.



text/css or text/xsl

Used in conjunction with stylehref, specifies the MIME type of an associated client-side stylesheet.



Any name for a token, plus the specific value to be assigned to the token of that name

XSLT only. Tokens provide a means to pass information from one stylesheet to the next without using other session mechanisms.


: FileMaker Specifications

FileMaker 8 Product Line

Specifications and Storage Limits

Field Types and Import/Export Formats

: Calculation Functions

Working with Calculations Primer

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

Script Step Reference

: Quick Reference

FileMaker Error Codes

FileMaker Keyboard Shortcuts

FileMaker Network Ports

FileMaker Server Command Line Reference

FileMaker XML Reference

: Other Resources

Where to Go for More Information

FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net