Custom Web Publishing Guide

Table Of Contents
78 Custom Web Publishing Guide
For example, the following URL adds a new parent Employee record for John Doe, and a new related record
for Jane in the portal at the same time. The name of the related table is Dependents, and the name of the related
field in the portal is Names. The match field, ID, stores an employee ID number.
http://192.168.123.101/fmi/xml/fmresultset.xml?-db=employees&-lay=family&FirstName=John&LastName=Doe&ID=9756
&Dependents::Names.0=Jane&-new
Note You can only add one related record to a portal per request.
Editing records in a portal
To edit one or more records in a portal, use the –edit command and a record ID to specify the parent record
that contains the portal records you want to edit. Specify the particular portal record to edit by using its record
ID in a fully qualified field name. You can determine a record ID from the record ID attribute of the
<record>
element in the
<relatedset> element in the XML data. See “Using the fmresultset grammar” on page 27.
For example, the following URL edits a record in a portal where the parent record has the record ID of 1001.
Dependents is the name of the related table, Names is the name of the related field in the portal, and the 2 in
Names.2 is the record ID of a portal record.
http://192.168.123.101/fmi/xml/fmresultset.xml?-db=employees&-lay=family&–recid=1001&Dependents::Names.2=Kevin
&-edit
Here is an example of how to use one request to edit multiple portal records via the parent record:
http://192.168.123.101/fmi/xml/fmresultset.xml?-db=employees&-lay=family&–recid=1001&Dependents::Names.2=Kevin
&Dependents::Names.5=Susan&-edit
You can also use the –edit command and specify 0 as the portal record ID to add a new related record in the
portal for an existing parent record. For example:
http://192.168.123.101/fmi/xml/fmresultset.xml?-db=employees&-lay=family&–recid=1001
&Dependents::Names.0=Timothy&-edit
About the syntax for specifying a global field
The syntax for specifying a global field is:
table-name::field-name(repetition-number).global
where global identifies a field as using global storage. For information about table-name and field-
name(repetition-number), see “About the syntax for a fully qualified field name” on page 77. For information on
global fields, see FileMaker Pro Help.
You must use the .global syntax to identify a global field in a query string. The Web Publishing Engine sets
the parameter values for global fields before performing the query command or setting any other parameter
values in the query string. For direct XML requests and requests made via XSLT stylesheets that don’t use
sessions, the global values expire immediately after the request is made. For requests made via an XSLT
stylesheet that use sessions, the global values persist for the duration of the session defined in the stylesheet,
or until they are changed again with another request.
If you don’t use the .global syntax to identify a global field in a query string, the Web Publishing Engine
evaluates the global field along with the remainder of the query string without setting the global field value
first.