I have a content query that I create in snippets, thats content query retrieve results from a list , I want to filter based on a column assigned to that contain a group of user, so i have to filter by the group of the current user , have you a custom value or query to do that thanks
1 Answer
you can use the Membership element to do that:
<Where>
<Or>
<Eq>
<FieldRef ID='AssignedTo' />
<Value Type='Integer'><UserID/></Value>
</Eq>
<Membership Type='CurrentUserGroups'>
<FieldRef Name='AssignedTo' />
</Membership>
</Or>
</Where>
Ref: http://www.martinhatch.com/2010/11/tip-caml-query-retrieve-tasks-assigned.html
The example above will return all items where the "AssignedTo" column (a multi-select "User or Group" field) contains either the current user directly, or a group of which the current user is a member.
-
yeah that work for a filtering a list, but what i want filter is a query content in the snippet of a master page which based in the list, the problem that this query is based on the list not a specific view– IssibraMay 15, 2014 at 8:25
-
So if it is possible I want that my query content based on a list view not on a view– IssibraMay 15, 2014 at 8:49