Form Selection
This optional section is used to identify properties for a list view of all forms belonging to a form template. XML documents belonging to a form can be placed in a single folder or library. Depending on the underlying support in the file system or server, this information can be used to create meaningful list views on a set of forms.For example, when InfoPath forms are saved into a Sharepoint Services form library that is based on an InfoPath form as a template, the form properties specified in this section are automatically promoted and made available to the default view of the form library.
listProperties
The optional listProperties element is a top-level child of xDocumentClass. It is the container for the properties that appear in a list view in a form library. Figure 4-15 shows the content model.
Figure 4-15: The listProperties content model.
fields
The fields element contains one or more fields for form library columns.
field
The field element defines a single field for form library columns. It specifies a relative XPath expression from the item attribute of an xmlToEdit element.The required node attribute contains an XPath expression that identifies the XML node or nodes in the form from which the data is read for list display.The required name attribute is the label to be used on the list header.The type attribute contains the XML Schema data type.columnName identifies the column name in the SQL table containing the list view.maxlength gives the maximum size of the field in bytes.required indicates if NULL values are allowed. Allowed values are “yes” and “no” (default).viewable indicates whether the field should be added to the default list view. Allowed values are “yes” and “no” (default). The aggregation attribute specifies how form property data should be processed to obtain a single value for a form library report. It can either be an aggregation action or an indication of the particular element in the collection.
<xsf:listProperties>
<xsf:fields>
<xsf:field
type="xsd:date"
name="TravelDate"
columnName="TravelDate"
required="yes"
viewable="yes"
node="TravelReport/Header/travelDate"
aggregation="first"/>
</xsf:fields>
</xsf:listProperties>