Custom Web Publishing with XML and XSLT

Table Of Contents
90 FileMaker Server Custom Web Publishing with XML and XSLT
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
Deleting portal records
To delete portal records, use the –delete.related parameter with the –edit command rather than using the
–delete command.
For example, the following URL deletes record 1001 from the table employees:
http://192.168.123.101/fmi/xml/fmresultset.xml?–db=employees&–lay=family&–recid=1001&–delete
But the following URL deletes a portal record with a record ID of 3 from the related table called Dependents,
with the parent record ID of 1001.
http://192.168.123.101/fmi/xml/fmresultset.xml?db=employees&lay=family&recid=1001
&
delete.related=Dependents.3&edit
For more information, see “–delete.related (Portal records delete) query parameter” on page 94.
Querying portal fields
In a solution that has many related records, querying and sorting portal records can be time consuming. To
restrict the number of records and rows to display in a related set, use the relatedsets.filter and relatedsets.max
parameters with find requests. For more information, see
“–relatedsets.filter (Filter portal records) query
parameter” on page 99 and “–relatedsets.max (Limit portal records) query parameter” on page 100.
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 89. 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.