Custom Web Publishing with XML and XSLT

Table Of Contents
Appendix A
|
Valid names used in query strings 89
About the syntax for a fully qualified field name
A fully qualified field name identifies an exact instance of a field. Because fields with common names can
be based on different tables, you must use fully qualified names, in some cases, to avoid errors.
The syntax for specifying a fully qualified field name is:
table-name::field-name(repetition-number).record-id
where:
1 table-name is the name of the table that contains the field. The table name is only required if the field is
not in the underlying table of the layout specified in the query string.
1 field-name(repetition-number) is the specific value in a repeating field, and is only required for repeating
fields. The repetition number starts counting at the numeral 1. For example, field-name(2) refers to the
second value in the repeating field. If you don’t specify a repetition number for a repeating field, the first
value in the repeating field is used. The repetition-number is required for the –new and –edit query
commands involving repeating fields, but it is not required for the –find command.
1 record-id is the record ID, and is only required if you are using a query string to add or edit records in
portal fields. See the following sections
“Adding records to a portal,” and “Editing records in a portal.”
The record-id is required for the –new and –edit query commands involving portal fields, but it is not
required for the –find command.
Note To be accessible, fields must be placed on the layout you specify in the query string.
Using query commands with portal fields
The following sections describe how query commands work with portal fields.
Adding records to a portal
To add a new record to a portal at the same time you add a parent record, use the –new query command and
do the following in query string for the request:
1 Use the fully qualified field name for the related portal field.
1 Specify 0 as the record ID after the name of the related portal field.
1 Specify at least one of the fields for the parent record before specifying the related portal field.
1 Specify the data for the match field (key field) in the parent record.
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 fmsresultset grammar” on
page 31.