Filter SharePoint Task based on current user id and current user group membership

So basically I want to view a task list that is assigned to the current user and groups where the current user is a member.

Based on the documentation that I found here , I tried to modify My Task View query.

Open SharePoint designer, locate the view “MyItems.aspx”, modify this query

<Eq>
<FieldRef Name="AssignedTo"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>

And change it into

<Or>
<Membership Type="CurrentUserGroups">
<FieldRef Name="AssignedTo"/>
</Membership>
<Eq>
<FieldRef Name="AssignedTo"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Or>

View your task list, and try to create a task for Current User and the Groups where Current User is a member of.

A Vanilla solution 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s