AnsweredAssumed Answered

Question of Query List by Users

Question asked by klaz on Oct 20, 2016
Latest reply on Oct 21, 2016 by klaz

Dears,

I am testing "query list" function. I have a list contains a column with type of "user and group". The data output is like "i:0#.w|ADname\username". I'd like to query the list by username, the CAML query is like below:

<Query>
<Lists>
<List ID="{7D4F77B5-1ABF-495E-9F57-636F584E817E}" />
</Lists>
<ViewFields>
<FieldRef Name="_x7528__x6237_ID" />
</ViewFields>
<Where>
<Eq>
<FieldRef Name="_x7528__x6237_ID" />
<Value Type="User">{WorkflowVariable:user}</Value>
</Eq>
</Where>
</Query>

But it returns nothing.

If I just input the username text(with out AD names), for example: 

<Value Type="User">username</Value>

it works well.

Would you please help me see this problem. Thank you.

Outcomes