O365 Query List with filter on Person field

  • 9 February 2015
  • 1 reply
  • 7 views

Badge +2

Hi there

When using the Nintex Workflow for O365 "O365 Query List" action there is an option to filter a list on a field. The field I would like to filter on is a 'Person' field. The XML return of the query contains the User ID like this:

"

<MetaDataCollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <MetaData>

    <Key>Employee</Key>

    <User>

      <FieldUserValue>

        <LookupId>28</LookupId>

      </FieldUserValue>

    </User>

  </MetaData>

</MetaDataCollection>

"

When trying to match the LookupId value to a different Person field 'User ID Number' or an instantiated variable containing only the 'User ID Number' the query returns no results. What should I do to make the filter work?


1 reply

Badge +2

Answering my own question. As workaround this can be accomplished by using the 'Call HTTP webservice' action, like this:

{Workflow Context:Current site URL}‌_api/web/lists/getbytitle('Employees')/items?$select=ID&$expand=FieldValuesAsText/Employee&$filter=Employee eq {Current Item:Created By}

Reply