I'm using SPServices to query a SharePoint list containing 3 fields of the type PeoplePicker. They allow multiple people to be added, so i need to check if the current user is added to any of the fields.
However i can't get the query to work, as only the first statement works.
Apologies if it's hard to read the query. Building it up manually as my CAML query tool don't allow to filter on users. And i'm a newbie to CAML.
<Query>
<Where>
<Or>
<Membership Type='CurrentUserGroups'>
<FieldRef Name='PeoplePickerFieldOne'/>
</Membership>
<Includes>
<FieldRef Name='PeoplePickerFieldOne'/>
<Value Type='Integer'>
<UserID Type='Integer'/>
</Value>
</Includes>
</Or>
<Or>
<Membership Type='CurrentUserGroups'>
<FieldRef Name='PeoplePickerFieldTwo'/>
</Membership>
<Includes>
<FieldRef Name='PeoplePickerFieldTwo'/>
<Value Type='Integer'>
<UserID Type='Integer'/>
</Value>
</Includes>
</Or>
<Or>
<Membership Type='CurrentUserGroups'>
<FieldRef Name='PeoplePickerFieldThree'/>
</Membership>
<Includes>
<FieldRef Name='PeoplePickerFieldThree'/>
<Value Type='Integer'>
<UserID Type='Integer'/>
</Value>
</Includes>
</Or>
</Where>
<OrderBy>
<FieldRef Name='Created' />
</OrderBy>
</Query>