2.2.1.2.52 field (2)

The field element specifies a field that is promoted from the form file and made available to the default list view of a form library. Each promoted field (3) MUST be specified by an instance of this element.

Parent Elements

fields

Attributes:

aggregation: This attribute specifies how a single XML node or a collection of XML nodes returned from evaluating the node attribute value is aggregated to obtain a value for the field. If this attribute is not present, its value MUST be interpreted as an empty string. If this attribute is present, it MUST be set to one of the following values:

  • average: The aggregate MUST be determined by calculating the average of all XML node values. This value MUST NOT be specified if any of the XML nodes is not of an XML schema number data type.

  • count: The aggregate value MUST be determined by calculating the number of XML nodes.

  • first: The aggregate value MUST be determined by returning the first XML node value in the collection.

  • last: The aggregate value MUST be determined by returning the last XML node value in the collection.

  • max: The aggregate value MUST be determined by calculating the maximum XML node value in the collection. This value MUST NOT be specified if any of the XML nodes is not of an XML schema number data type.

  • merge: The aggregate value MUST be determined by concatenating all XML node values in the collection separated by newline characters.

  • min: The aggregate value MUST be determined by calculating the minimum XML node value in the collection. This value MUST NOT be specified if any of the XML nodes is not of an XML schema number data type.

  • plaintext: The aggregate value MUST be determined by returning the raw, unformatted text value of the XML node. This value MUST NOT be specified if the node attribute value evaluates to a collection of more than one XML node. This value MUST NOT be specified if the XML nodes is not of an XML schema rich text data type.

  • sum: The aggregate value MUST be determined by calculating the sum of all XML node values in the collection. This value MUST NOT be specified if any of the XML nodes is not of an XML schema number data type.

columnName: This attribute specifies the internal name of the corresponding column in the SQL database underlying the list view. The specified value MUST match the columnName attribute for the fieldExtension element, as specified in section 2.2.2.2.20.

maxLength: This attribute specifies the maximum length of the field (3) in the number of bytes. If this attribute is not present, its value MUST be determined by the field type and site settings.

name: This attribute specifies the friendly name of the field (3) used on the list view.

node: This attribute specifies the XPath expression that evaluates to the corresponding field in the form file.

required: This attribute specifies whether this field (3) accepts NULL values. If this attribute is not present, its value MUST be interpreted as "no".

type: This attribute specifies the standard XML schema data type of the field (3).

viewable: This attribute specifies whether this field (3) is added to the default list view. If this attribute is not present, its value MUST be interpreted as "yes".

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

 <xsd:element name="field">
   <xsd:complexType>
     <xsd:attribute name="type" type="xsd:NMTOKEN" use="required"/>
     <xsd:attribute name="name" type="xsf:xdTitle" use="required"/>
     <xsd:attribute name="columnName" type="xsf:xdTitle" use="required"/>
     <xsd:attribute name="required" type="xsf:xdYesNo" use="optional"/>
     <xsd:attribute name="viewable" type="xsf:xdYesNo" use="optional"/>
     <xsd:attribute name="node" type="xsd:string" use="required"/>
     <xsd:attribute name="maxLength" type="xsd:byte"/>
     <xsd:attribute name="aggregation" use="optional">
       <xsd:simpleType>
         <xsd:restriction base="xsd:NMTOKEN">
           <xsd:enumeration value="sum"/>
           <xsd:enumeration value="count"/>
           <xsd:enumeration value="average"/>
           <xsd:enumeration value="min"/>
           <xsd:enumeration value="max"/>
           <xsd:enumeration value="first"/>
           <xsd:enumeration value="last"/>
           <xsd:enumeration value="merge"/>
           <xsd:enumeration value="plaintext"/>
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:attribute>
   </xsd:complexType>
 </xsd:element>