AnsweredAssumed Answered

How do I query a list using a filter where the filter field is a person field that can contain many?

Question asked by nderiley on Aug 23, 2018
Latest reply on Sep 11, 2018 by emha

Hi Forum!

I am trying to query a list called Systems using a filter against the system owner.  My problem - I received a new requirement that System Owner which is a person field, needs to allow multiple selections.


Before this, my query was easy - filter by systemowner  ID.  Now I'm not sure what to do.  I can construct a comma (or semi colon, or whatever) delimited list of user Ids of the owners, but I don't know how to use that in my where clause.  I have tried a comma delimited and semicolon delimited list of IDs in a query that looks like:


<List ID="{235E8F30-0228-4ED9-897E-139662390380}" />
<FieldRef Name="ID" />
<FieldRef Name="ApplicationState" />
<Value Type="Text">Active</Value>
<FieldRef Name="ApplicationOwner" LookupId="TRUE" />
<Value Type="User">{WorkflowVariable:currAppOwnerIdMulti}</Value>


where the variable currAppOwnerIdMulti is the list of Ids.  This query works if only 1 id is present. It does not work with 2 when they are comma or semicolon delimited.  Does my requirement make sense? Is it even possible?