Get tasks assigned to user or to current user groups in SharePoint using CAML query
2013-07-18 17:45
627 查看
The CAML Query: tasks assigned to user or to current user groups
1. Membership 类型参数有五种:SPWeb.AllUsers, SPGroup, SPWeb.Groups,CurrentUserGroups , SPWeb.Users
SPWeb.AllUsers: 返回直接分配任务给用户,而不是通过group的items。
[b]SPGroup: <Membership Type=”SPGroup” ID=”7″> group的ID为7,返回任务分配给group所有的成员的items。[/b]
SPWeb.Groups: 与2相反, 返回任务分配给group的items,不是单独的成员。
CurrentUserGroups: 当前用户
SPWeb.Users: 表示用户,不属于任何一个组
<Where> <And> <Or> <Membership Type=’CurrentUserGroups’> <FieldRef Name=’AssignedTo’ /> </Membership> <Eq> <FieldRef Name=’AssignedTo’ LookupId=’TRUE’ /> <Value Type=’Lookup’>123</Value> </Eq> </Or> <Neq> <FieldRef Name=’Status’ /> <Value Type=’Text’>Completed</Value> </Neq> </And> </Where>
1. Membership 类型参数有五种:SPWeb.AllUsers, SPGroup, SPWeb.Groups,CurrentUserGroups , SPWeb.Users
SPWeb.AllUsers: 返回直接分配任务给用户,而不是通过group的items。
[b]SPGroup: <Membership Type=”SPGroup” ID=”7″> group的ID为7,返回任务分配给group所有的成员的items。[/b]
SPWeb.Groups: 与2相反, 返回任务分配给group的items,不是单独的成员。
CurrentUserGroups: 当前用户
SPWeb.Users: 表示用户,不属于任何一个组
相关文章推荐
- Get the SharePoint groups in Infopath 2010 and SharePoint 2010 by current user without any code
- Switch view in the InfoPath form according to the whether current user is in SharePoint group admin
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- InfoPath display or hide some section according to whether current user belong to SharePoint group
- How to get current date time in SharePoint Site Time Zone
- How to get the current user logged into Sharepoint
- How to get value of the person or group type via CAML Query js
- Sharepoint Query List Item Using CAML(folder)
- Submitting data to a SharePoint 2010 List using InfoPath - CAML
- How to Modify the web.config file in SharePoint using SPWebConfigModification?
- Using the string repalce action in SharePoint workflow designer to send mail from mail template
- 学习:New in SharePoint 2010 CAML Query <IN>,<INCLUDES> &< NOT INCLUDES>(转)
- How to get the Current Controller Name, Action, or ID in ASP.NET MVC
- Adding Custom Actions to the List Item Menu in SharePoint 2010 Using SharePoint Designer 2010[Sharepoint中添加自定义菜单]
- How to unlock the locked tasks in Sharepoint Workflow
- How to Sign in as a Different User in SharePoint 2013
- 四 错误处理篇 How to Fix Login Failed For User NT AUTHORITY IUSRS in SharePoint 2013 ...
- Liferay get Organization by using User or get All Organizations in liferay database
- How to Enable or Disable Document Property Promotion (ParserEnabled) in SharePoint 2013
- Using GPS to get current location in Android