If you need to create a view which filters the AssignedTo field, you can set the filter to =[Me] in the user interface. The user will see items assigned to himself or herself.
But what if the items are assigned to groups to which the user belongs, as well as to the user individually?
- Create a new view, and open the view’s .aspx page in SharePoint Designer.
- Locate the <ListViewXML> tag
- Locate the Where clause inside the tag. It begins with <Where and ends with /Where>.
- Replace the tag with the following:
<Where><Or><Membership Type="CurrentUserGroups"><FieldRef Name="AssignedTo"/></Membership><Eq><FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID Type="Integer"/></Value></Eq></Or></Where>
Posted
Oct 21 2008, 12:18 PM
by
danholme