Task assigned to user or current user groups in SharePoint 2010 using CAML query


This CAML SharePoint tutorial explains how we can assigned task to current user groups using CAML query in SharePoint 2010.


Follow the below steps:

1. Open your site in SharePoint designer 2010.

2. Go to List and Libraries option.

3. Select your Task List to see in fig.

 Task assigned to user or current user groups in SharePoint 2010 using CAML query
Task assigned to the user or current user groups in SharePoint 2010 using CAML query

4. Open the task list in advance mode or .aspx extension file.

5. Find the view  tag under this <Query> option

6. Change by the following code only under the <Query> tag

<View Name=……
<Query>
<Where>
<Or>
<Membership Type=”CurrentUserGroups”>
<FieldRef Name=”AssignedTo” />
</Membership>
<Eq>
<FieldRef Name=”AssignedTo” />
<Value Type=”Integer”>
<UserID Type=”Integer”/>
</Value>
</Eq>
</Or>
</Where>
</Query>

7. Save and check out.

You may like following SharePoint CAML Query examples:



Hope this SharePoint caml query filter by current user tutorial will help you.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials:

About Navneet Singh

I am Navneet Singh, Working at C3it software solutions pvt. ltd. in Pune. My core skills are SharePoint 2013, Office 365, SharePoint 2010, SharePoint Designer, SharePoint Designer Workflow, Nintex Workflow, Infopath, Webpart, CSOM/SSOM, Power-shell, C#, ASP.NET and SQL Server.

View all posts by Navneet Singh →