How to Filter SharePoint 2010 Tasks Which are Assigned to You and The Group Your are Member of?
Normally we use standard view to filter assigned tasks by using [Me] in filter option. But you can use only [Me] and [Today]. What you can do if you want to see tasks which is assigned to you and tasks which are assigned to a SharePoint group that you are member of.
This is actually very easy step. But you have to use SharePoint designer to do this.
Open SharePoint designer then open site that you want to study. Select the task list or any list that you want to filter. When you select task list you will see a panel right site of designer called views. Then select the view that we will modify.
In source view search for <Query> and you will see view query. If you already modify view as filtered by [Me] you are going to see more or less query as shown in picture. Modify this query string with code given below. that’s how user can see tasks which are assigned to him or his group.
The key ingredient is “CurrentUserGroups”. Now you can modify any list and make different types of filter. This query syntax called CAML. If you study little bit, then you can make complex query or what ever you want.
I hope this tutorial help you.
<Query> <Where> <Or> <And> <Eq> <FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID/></Value> </Eq> <IsNull> <FieldRef Name="WorkflowOutcome"/> </IsNull> </And> <And> <Membership Type="CurrentUserGroups"><FieldRef Name="AssignedTo"/></Membership> <IsNull> <FieldRef Name="WorkflowOutcome"/> </IsNull> </And> </Or> </Where> </Query>