cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to you filter results within a Query List action by assigned to?

Jump to solution

I am trying to query a workflow task list by status and assigned to using the Query List action. The status part works fine however it just errors out on the assigned to part. Am I missing something obvious?

Here is the CAML query if that helps from the "Run now" option

<Query>
  <Lists>
    <List ID="{F8CF9D25-2E7B-4702-9E85-834450D992E8}" />
  </Lists>
  <ViewFields>
    <FieldRef Name="AssignedTo" />
    <FieldRef Name="WorkflowLink" />
    <FieldRef Name="Title" />
  </ViewFields>
  <Where>
    <And>
      <Eq>
        <FieldRef Name="Status"  />
        <Value Type="Choice">in progress</Value>
      </Eq>
      <Eq>
        <FieldRef Name="AssignedTo" LookupId="TRUE" />
        <Value Type="User">Steve</Value>
      </Eq>
    </And>
  </Where>
</Query>

Labels: (2)
Tags (1)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: How to you filter results within a Query List action by assigned to?

Jump to solution

Try setting LookupId="FALSE" or removing LookupId="TRUE".  Give those a try and see if that works.

Reply
Workflow Hero

Re: How to you filter results within a Query List action by assigned to?

Jump to solution

That did it! I would have never of thought to change that. Thank you!

Reply
Workflow Hero

Re: How to you filter results within a Query List action by assigned to?

Jump to solution

if you specify LookupId="TRUE" then you have to supply sharepoint's user ID in the value field

if you specify LookupId="FALSE" then you have to supply user's display name in the value field

Reply