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:
http://my.filemakerserver.net/fmi/xsl/customer-files/customer_list.xsl?-db=Customer&-lay=list&-max=50&-findall
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.
This section lists the possible query commands. If the command requires certain specific additional parameters, those are listed.
Command | Parameters Required | Description |
---|---|---|
-dbnames | None | Returns a list of all databases on the given server that are enabled for XML or XSLT publishing. |
http://my.server.com/fmi/xml/fmresultset.xml?-dbnames | ||
-delete | -db, -lay, -recid | Delete the record with the specified recid from the specified database. (The affected table is determined by the specified layout.) |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-recid=303&-delete | ||
-dup | -db, -lay, -recid | Duplicate the record with the specified record ID from the specified database. (The affected table is determined by the specified layout.) |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-recid=303&-dup | ||
-edit | -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. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-recid=303&name_first=Sarah&-edit | ||
-find | -db, -lay, field name(s) | Find a record in the specified database and table, with search criteria determined by the supplied field data. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_last=Smith&-find | ||
-findall | -db, lay | Find all records in the specified database and table. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-findall | ||
-findany | -db, -lay | Find a random record in the specified database and table. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-findany | ||
-layoutnames | -db | Returns a list of all layout names from the specified database. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-layoutnames | ||
-new | -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. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_first=Kai&name_last=Love&-new | ||
-process | -grammar | XSLT only. This command instructs the Web Publishing Engine to process a stylesheet without performing any database transactions. |
http://my.server.com/fmi/xsl/stylesheet.xsl?-grammar=fmresultset&-process | ||
-scriptnames | -db | Returns a list of the names of all scripts in the specified database. |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-scriptnames | ||
-view | -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. |
http://my.server.com/fmi/xml/FMPXMLLAYOUT.xml?-db=Customer&-lay=web&-view |
Parameter Name | Required Value(s) | Description | |
---|---|---|---|
-db | Name of a database (without file extension) | Specify a database as a target of the URL command. Most commands require this parameter. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_first=Kai&name_last=Love&-new | |||
-encoding | 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 | |
http://my.server.com/fmi/xsl/stylesheet.xsl?-grammar=fmresultset&-db=Company&-lay=detail&-encoding=ISO-8859-1&name=Beech%20Street&-new | |||
-field | Name of a container field | Specify a container field from which to extract data. | |
http://my.filemakerserver.net:8080/fmi/xml/cnt/data.tiff?-db=Customers&-lay=web_search&-field=photo[1]&-recid=303 | |||
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). | ||
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_first=Kai&name_last=Love&-new | |||
eq cn bw ew gt gte lt lte neq | (equals) (contains) (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 | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Agent&-lay=web&commission=.3&commission.op=gte&-find | |||
-grammar | One of the four FileMaker XMLgrammars | XSLT only. Specify the grammar in which the XML data should be passed to the XSL stylesheet. | |
http://my.server.com/fmi/xsl/stylesheet.xsl?-grammar=fmresultset&-process | |||
-lay | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_first=Kai&name_last=Love&-new | |||
-lay.response | 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). | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-findall | |||
-lop | and or or | Specifies whether the criteria in a find request represent an "and" search or an "or" search. (The default is "and".) | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_last=Smythe&hair_color=red&-lop=or&-find | |||
-max | A positive number, or the value "all" | For a find or findall request, specifies how many records to return. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_last=Smythe&hair_color=red&-max=25&-find | |||
-modid | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_last=Smythe&recid=10003&-modid=13&-edit | |||
-recid | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&name_last=Smythe&recid=10003&-modid=13&-edit | |||
-script | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-script=OmitDuplicates&-findall | |||
-script.param | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-script=Omit&-script.param=3&-find | |||
-script.prefind | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-script.prefind=Omit&-script.prefind.param=3&-find | |||
-script.prefind.param | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-script.prefind=Omit&-script.prefind.param=3&-find | |||
-script.presort | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-script.presort=Omit&-script.presort.param=3&-find | |||
-script.presort.param | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-script.presort=Omit&-script.presort.param=3&-find | |||
-skip | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-skip=20&-max=25&-find | |||
-sortfield.precedence | 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. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-skip=20&-max=25&sortfield.1=name&-find | |||
-sortorder.precedence | ascend, descend, or a value list name | Specify a sort order for a specific sort field. | |
http://my.server.com/fmi/xml/fmresultset.xml?-db=Customer&-lay=web&-lay.response=web_response&-skip=20&-max=25&sortfield.1=name&-sortorder.1=descend&-find | |||
-stylehref | 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. | |
http://my.server.com/fmi/xsl/stylesheet.xsl?-grammar=fmresultset&-stylehref=/stylesheets/display.css&-styletype=text/css&-process | |||
-styletype | text/css or text/xsl | Used in conjunction with stylehref, specifies the MIME type of an associated client-side stylesheet. | |
http://my.server.com/fmi/xsl/stylesheet.xsl?-grammar=fmresultset&-stylehref=/stylesheets/display.css&-styletype=text/css&-process | |||
-token. | 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. | |
http://my.server.com/fmi/xsl/stylesheet.xsl?-grammar=fmresultset&-token.name=Fred&-process |
: 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