Caml query for multiple user Fields
Transferred from jianyi blog:
A friend asked: A list contains multiple user columns. If you want to determine whether the current user is included in this column, you cannot write caml. Can you help.
I don't know about this, but I think there is a task view in the task list to show the tasks assigned to the current user. How does it do?
The results show that only one value can be entered for the field of the assigned object, which is different from the problem of this friend.
It doesn't matter. Let's see if the field of the assigned object can be modified to the multi-user mode. We can find it in the list settings:
After changing to allow multiple selections, you can enter multiple users, and there is no problem in filtering my task View:
Well, let's take a look at how the system's filtering conditions are written.
Open the site with spcamleditor and navigate to my task view. You can see it:
<Where>
<EQ>
<Fieldref name = "assignedto"/>
<Value type = "integer">
<USERID/>
</Value>
</EQ>
</Where>
Spcamleditor can be downloaded:
Http://spcamleditor.codeplex.com/