Introduction

In this articlewe will explain the following:

How to show all assigned tasks to you or to a group of which you are a member in one custom task list view?


Scenario

In Workflow Tasks List, consider you are a member of a specific group, and you have assigned to two tasks.
  1. "Task 1" has assigned directly to you.
  2. "Task 2" has assigned to a group that you belong to.


To follow up the tasks that directly assigned to you, you should follow up these tasks through the "My Tasks" view.


To follow up the tasks that assigned to your group (In our example it's "Qassas Owners" group), you should follow up these tasks through "By My Groups" view.


Here, we will show all the tasks assigned to you in one custom view whether
  • The task has been assigned directly to you or
  • It has been assigned to groups of which you are a member.


Steps

  • Create a custom view from the existing view "My Tasks".
    • From the above ribbon > List Tab > Click on Create View.
    • Below Start from an existing view > Click on "My Tasks" view.

  • Open SharePoint Designer > Open your site.
  • Go to Tasks list >Views > edit your newly created custom view in Advance Mode.

  • In <View> element, find the <Query> element, within it, add the below line.
<GroupBy Collapse="TRUE" GroupLimit="30"><FieldRef Name="AssignedTo"/></GroupBy>
  • Again, before </Query> element, Find the <Where> element, and remove it.
<Where><Eq><FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID Type="Integer"/></Value></Eq></Where>


  • Replace the removed <Where> element with the below <Membership> element.
<Where><Or> <Membership Type="CurrentUserGroups"> <FieldRef Name="AssignedTo"/> </Membership> <Eq> <FieldRef Name="AssignedTo"></FieldRef> <Value Type="Integer"> <UserID/> </Value> </Eq> </Or></Where>

Note: Membership element defines a filter for cases where the user is either assigned a task based on membership in a group or assigned a task directly.
  • Save the newly created view > Press F12 to preview it in the browser.

  • Your assigned tasks should be now shown in one custom view, whether
    • The task has been assigned directly to you or
    • It has been assigned to groups of which you are a member.


Applies To

  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.

Conclusion

In this article, we have explained How to merge the assigned tasks to the current user or a group that the current user belongs to in one custom view?

Reference

Merge all tasks that assigned to you or to your group into a custom task list view via SharePoint Designer
Back To Top