sharepointListAdapter Element

Microsoft Office InfoPath

Show All Show All

sharepointListAdapter Element

Contains the data adapter information to query a SharePoint list or library.

Type

xsd:complexType

Child Elements

Element Description
field Contains field mapping information for each field in a SharePoint list and the corresponding name used in Microsoft Office InfoPath 2003 Service Pack 1.

Attributes

Attribute Type Required Description Possible Values
name xdTitle Yes Contains the name of the sharepointListAdapter and is used as the secondary data source name.

minLength = 1

maxLength = 255

pattern = ([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

siteUrl xsd:string Yes Contains the Uniform Resource Locator (URL) of the SharePoint site. string
sharepointGuid xsd:string Yes Contains the GUID of the SharePoint list. string
infopathGroup xsd:string Yes Contains the name of the group under which all fields in the SharePoint list will be stored. string
queryAllowed xdYesNo No Specifies whether the adapter can be used for querying the data source. Always set to "yes" for the sharepointListAdapter.
  • yes
  • no
submitAllowed xdYesNo No Specifies whether the adapter can be used for submitting to the data source. Omitted for the sharepointListAdapter, corresponding to a default value of "no".
  • yes
  • no

Definition

    <xsd:element name="sharepointListAdapter">
  <xsd:complexType>
    <xsd:sequence>
      <xsd:element name="field" minOccurs="0" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:attribute name="sharepointName" type="xsd:string" use="required"></xsd:attribute>
          <xsd:attribute name="infopathName" type="xsd:string" use="required"></xsd:attribute>
          <xsd:attribute name="isLookup" type="xsf:xdYesNo" use="optional"></xsd:attribute>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="name" type="xsf:xdTitle" use="required"></xsd:attribute>
    <xsd:attribute name="siteUrl" type="xsd:string" use="required"></xsd:attribute>
    <xsd:attribute name="sharepointGuid" type="xsd:string" use="required"></xsd:attribute>
    <xsd:attribute name="infopathGroup" type="xsd:string" use="required"></xsd:attribute>
    <xsd:attribute name="queryAllowed" type="xsf:xdYesNo" use="optional"></xsd:attribute>
    <xsd:attribute name="submitAllowed" type="xsf:xdYesNo" use="optional"></xsd:attribute>
  </xsd:complexType>
</xsd:element>

  

Remarks

Each field in the SharePoint list that is returned by the data adapter will have a field element. The sharepointListAdapter can only be used as a secondary data source and does not support a submit action.

Note  This item is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Editions Service Pack 1 or later is not installed. Any form defined by a form definition file (.xsf) that includes this item cannot be opened in InfoPath when service pack features are disabled or unavailable.

Example

The following is an example of the sharepointListAdapter element:

    <xsf:sharepointListAdapter
 name="Status Report library"
 siteUrl=”http://xyzco/reports/”
 sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"
 infopathGroup="XyzReportsLibrary"
 queryAllowed="yes>
 <xsf:field
  sharepointName="File_x0020_Type"
  infopathName="Type"></xsf:field>
 <xsf:field
  sharepointName="xd__x007b_D00F1DBD_..."
  infopathName="Title_1"></xsf:field>
</xsf:sharepointListAdapter>