Filtered Data View for my items and items of groups that I am a member

I found that I could create a view that filtered items for myself ([Me]) and for the groups that I was in, but not both through the View editor.   By editing the group view in SharePoint Designer, I updated the CAML query to filter both groups and items “assigned to me” and it worked just dandy:

<Query>
<GroupBy Collapse=”FALSE” GroupLimit=”30″>
<FieldRef Name=”AssignedTo”/>
</GroupBy>
<OrderBy>
<FieldRef Name=”AssignedTo”/>
<FieldRef Name=”Status”/>
</OrderBy>
<Where>
<Or>
<Membership Type=”CurrentUserGroups”/>
<FieldRef Name=”AssignedTo”/>
</Membership/>
<Eq>
<FieldRef Name=”AssignedTo”/>
<Value Type=”Integer”>
<UserID Type=”Integer”/>
</Value>
</Eq>
</Or>
</Where>
</Query>

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: