Membership element (Query)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Defines a filter based on the type of membership for the user.
<Membership
Type = "Text">
</ Membership>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Description |
---|---|
Type |
Required Text. Specifies the type of membership for the user. Possible values include the following: SPWeb.AllUsers SPGroup SPWeb.Groups CurrentUserGroups SPWeb.Users |
Child elements
Parent elements
Occurrences
- Minimum: 0
- Maximum: Unbounded
Remarks
The following example defines a filter for cases where the user is either assigned a task based on membership in a group or assigned a task directly.
<Or>
<Membership Type=\"CurrentUserGroups\">
<FieldRef Name=\"AssignedTo\"/>
</Membership>
<Eq>
<FieldRef Name=\"AssignedTo\"></FieldRef>
<Value Type=\"Integer\">
<UserID/>
</Value>
</Eq>
</Or>