This documentation is archived and is not being maintained.

role Element

Office 2007

Defines role.

Type

xsd:complexType

Child Elements

None.

Attributes

AttributeTypeRequiredDescriptionPossible Values
name
xdRoleName
YesUsed to identify the role.Same restriction as xdViewName.
xdRoleName

Definition

<xsd:element name="role">
  <xsd:complexType>
    <xsd:attribute name="name" type="xsf:xdRoleName" use="required"></xsd:attribute>
  </xsd:complexType>
</xsd:element>

Remarks

Each time a role is created for a form, a corresponding role element is created in the form definition file (.xsf). You can assign users to roles by using user names, groups, and XPath user names. Users can be selected for roles in one of four ways:

  • Initiator—role for new documents.
  • User name—NT domain users (intranet or trusted only).
  • XPath user name—user names stored in XML data (intranet or trusted only).
  • Group—Active Directory directory service groups (intranet or trusted only).

InfoPath makes the user assignment by following the membership order in the form definition file.

Example

The following is an example of the role element:

<roles initiator=”xsd:string” default=”xsd:string” hideStatusBarDisplay="xsf:xdYesNo">
      <role name=”xsf:xdRoleName”/>
      <membership>
            <getUserNameFromData dataObject=”xsd:string” select=”xsd:string” memberOf=”xsd:string” />
            <userName name=”xsd:string” memberOf=”xsd:string” />
            <userName name=”xsd:string” memberOf=”xsd:string” />
            <group name=”xsd:string” memberOf=”xsd:string” />
      </membership>
</roles>


Show: