I have a SharePoint List containing task items. Tasks are assigned to a specific SharePoint Group or individual user. Each group has its own members. Requirement is, if current user is member of any of those groups, can see assigned tasks under My Tasks View.
There are few possible solutions, one of them is to modify Query filter via SharePoint Designer.
Filtering a list view by group membership
Open SharePoint designer then open site. Select the Task List under Lists and Libraries. (For example, here we have selected "ResourceDocumentTypes").
Step: 2When you select task list you will see a panel on right side named "Views". Select the view that needs to be modified. (For this example it’s "My Events")
Note: If you cannot edit file, you must select advanced mode.
In source view, search for <Query> and you will see View Query. If you have already modified view as filtered by [Me]. In that case, you need to modify the query which contains
<Query><Where><Eq><FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID
With below code:
<Membership Type="CurrentUserGroups"><FieldRef Name=" AssignedTo"/>
<FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID Type="Integer"/></Value>
Be sure to change the "FieldRef Name" to your own field, and click Save. Done!
Now, User can see all task items where “AssignedTo” field contains a SharePoint Group that logged in user is a member of and also assigned to him/her directly.
Here is a list view showing all tasks assigned to different SharePoint Groups:
Below is filtered list view showing only tasks assigned to SharePoint Groups for which current user is a member.