Check whether a user exists in the Multi-choice user field (from jianyi blog)

Source: Internet
Author: User
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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.