2.2.1.2.132 sharepointListAdapterRW

The sharepointListAdapterRW element specifies the properties of a data adapter that MUST be created to query and submit data from and to a list. The data adapter MUST NOT support submitting data to the list as a secondary data source.

Parent Elements

query

Child Elements

field

Attributes:

autogen: This attribute specifies whether this data adapter is associated with a lookup field defined in the main data source. If this attribute is not present, its value MUST be interpreted as "no".

contentTypeID: This attribute specifies the content type identifier, as specified in [MS-WSSTS] section 2.1.2.8.1, of the content type associated with the data adapter. This attribute MUST be set to an empty string for a secondary data source.

name: This attribute specifies the name of the data adapter. The specified name MUST be unique for all data adapters within the form template.

queryAllowed: This attribute specifies whether the data adapter is allowed to query the list (1) for data. The value for this attribute MUST be set to "yes". If this attribute is not present, its value MUST be interpreted as "yes".

queryOneItemOnly: This attribute specifies whether the main data source is allowed to query one or multiple list items. The value for this attribute MUST NOT be present for a secondary data source (2). If this attribute is not present, its value MUST be interpreted as "no".

relativeListUrl: This attribute specifies the URL of the list. If the siteURL attribute is an absolute URL, the value for this attribute MUST be relative to siteURL. If the siteURL attribute is a server-relative URL, the value for this attribute MUST also be a server-relative URL. Otherwise it MUST be relative to the form template’s location.

sharePointListChoices: This attribute specifies the name of the secondary data source associated with this data adapter. The value for this attribute MUST be the name of an xmlFileAdapter element, as specified in section 2.2.1.2.26, that exists in the form template. This attribute MUST NOT be present for a secondary data source. This attribute MUST be present only if this data adapter contains a field element, as specified in section 2.2.1.2.133, that specifies a type value set to "Choice" or "MultiChoice".

sharePointListID: This attribute specifies the list identifier, as specified in [MS-WSSTS] section 2.1.2.7, of the list (1) associated with the data adapter.

siteURL: This attribute specifies the URL of the parent site. It MUST be an absolute URL, a server-relative URL, or a URL relative to the form template’s location.

sortAscending: This attribute specifies the value to use for the Ascending attribute of the OrderBy element, as specified in [MS-WSSCAML] section 2.2.2.1.3, to query the list for data. This attribute MUST NOT be present for a main data source or for a secondary data source with the autogen attribute set to "yes". If this attribute is not present, its value MUST be interpreted as "no".

sortBy: This attribute specifies the value to use for the SortBy attribute of the OrderBy element, as specified in [MS-WSSCAML] section 2.2.2.1.3, to query the list for data. This attribute MUST NOT be present for a main data source or for a secondary data source with the autogen attribute set to "yes".

submitAllowed: This attribute specifies whether the data adapter is allowed to submit data to the list (1). This attribute MUST be set to "yes" for a main data source and MUST be set to "no" for a secondary data source (2). If this attribute is not present, its value MUST be interpreted as "no".

version: This attribute specifies the version of the content type against which this main data connection was created. This attribute MUST NOT be present for a secondary data source.

This attribute MUST be a hash of the field property summary generated using the SHA-256 hash algorithm ([NIST.FIPS.180-4]). The field property summary is a delimited list of all properties for every field defined in the content type. It has the following structure:

  • "<Field1Properties>\r\n<Field2Properties>\r\n...<FieldNProperties>\r\n" where n is the number of fields defined in the content type.

Each <FieldNProperties> string MUST follow this structure:

  • "<FieldAttributesNameValuePairs><FieldElementsNameValuePairs>\r\n"

The FieldAttributesNameValuePairs structure MUST be a list of strings, one for each attribute, which MUST follow this structure:

  • "<FieldDefinitionAttributeName>:<FieldDefinitionAttributeValue>\r\n"

Each FieldDefinitionAttributeName/FieldDefinitionAttributeValue pair MUST be constructed using the ordered set of field definition attributes in the following table.

Field Definition Attribute Name

Field Definition Attribute Value

Name

Value set for the field’s Name attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Type

Value set for the field’s Type attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

MaxLength

Value set for the field’s MaxLength attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Min

Value set for the field’s Min attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Max

Value set for the field’s Max attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Required

Value set for the field’s Required attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

RichText

Value set for the field’s RichText attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

RichTextMode

Value set for the field’s RichTextMode attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

List

Value set for the field’s List attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

ShowField

Value set for the field’s ShowField attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

UserSelectionScope

Value set for the field’s UserSelectionScope attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

FillInChoice

Value set for the field’s FillInChoice attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Format

Value set for the field’s Format attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Decimals

Value set for the field’s Decimals attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Percentage

Value set for the field’s Percentage attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

LCID

Value set for the field’s LCID attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

ReadOnly

Value set for the field’s ReadOnly attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Format

Value set for the field’s Format attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

AppendOnly

Value set for the field’s AppendOnly attribute in the content type, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

Any field definition attributes, as specified in the preceding table, that are not present in the content type CAML for a field MUST NOT be included in the FieldAttributesNameValuePairs structure.

The FieldElementsNameValuePairs structure MUST be a "\r\n" separated list constructed using the ordered set of field definition elements in the following table.

Field Definition Element Name

Field Definition Element Value

CHOICES

The field’s choices XML node element in the content type CAML, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

The string value for this element MUST be set to a concatenation of strings. Each string MUST be set to the text within every child XML node with leading and trailing white space characters removed.

Default

Specifies the field’s default XML node element in the content type CAML, as specified in [MS-WSSFO2] section 2.2.8.3.3.1.

The string value for this element MUST be set to a concatenation of strings. Each string MUST be set to the text within every child XML node with leading and trailing white space characters removed.

The field definition elements specified in the preceding table that are not present in the content type CAML for a field MUST NOT be included in the FieldElementsNameValuePairs structure.

The FieldElementsNameValuePairs string value MUST NOT contain leading or trailing white space characters.

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

 <xsd:element name="sharepointListAdapterRW">
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element name="field" minOccurs="0" maxOccurs="unbounded">
         <xsd:complexType>
           <xsd:attribute name="internalName" type="xsd:string" use="required"/>
           <xsd:attribute name="hiddenFieldName" type="xsd:string" use="optional"/>
           <xsd:attribute name="type" type="xsd:string" use="required"/>
           <xsd:attribute name="auxDomName" type="xsd:string" use="optional"/>
           <xsd:attribute name="showFieldName" type="xsd:string" use="optional"/>
           <xsd:attribute name="required" type="xsf:xdYesNo" use="optional"/>
           <xsd:attribute name="appendOnly" type="xsf:xdYesNo" use="optional"/>
         </xsd:complexType>
       </xsd:element>
     </xsd:sequence>
     <xsd:attribute name="name" type="xsf:xdTitle" use="required"/>
     <xsd:attribute name="siteURL" type="xsd:string" use="required"/>
     <xsd:attribute name="sharePointListID" type="xsd:string" use="required"/>
     <xsd:attribute name="contentTypeID" type="xsd:string" use="required"/>
     <xsd:attribute name="queryAllowed" type="xsf:xdYesNo" use="optional"/>
     <xsd:attribute name="submitAllowed" type="xsf:xdYesNo" use="optional"/>
     <xsd:attribute name="autogen" type="xsf:xdYesNo" use="optional"/>
     <xsd:attribute name="relativeListUrl" type="xsd:string" use="optional"/>
     <xsd:attribute name="version" type="xsd:string" use="optional"/>
     <xsd:attribute name="sharePointListChoices" type="xsd:string" use="optional"/>
     <xsd:attribute name="queryOneItemOnly" type="xsf:xdYesNo" use="optional"/>
     <xsd:attribute name="sortBy" type="xsd:string" use="optional"/>
     <xsd:attribute name="sortAscending" type="xsf:xdYesNo" use="optional"/>
   </xsd:complexType>
 </xsd:element>