Skip to main content

Notifications

Power Automate - General Discussion
Answered

How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

(0) ShareShare
ReportReport
Posted on by 131

Ok,

I have a workflow that needs to check if the person in the people picker field is present in a separate list's people picker field.

I have been trying to create the oData filter all day, but I keep getting failures.

Name of the field in list #2 is 'Responder Name' or Responder_x0020_Name.
Name of the field in list #1 is 'Individual Requested'

My odata query is below.  The dynamic value is the Individual Requested Email from List #1.

 

query is Responder_x0020_Name/Email eq DYNAMIC VALUE 'Individual Requested Email'

Tj7933_0-1667332098869.png

Power Automate is not accepting the field name from table 2 in the odata query. 

Can someone help me determine why the odata filter is not working and how the field from table 2 is to be identified?

Thanks

FYI - I tried using the beta version of odata query creator, but that will not allow a people picker field to be selected from either list.

  • Tj7933 Profile Picture
    Tj7933 131 on at
    Re: How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

    nope.

     

    It was funny.  If I used items()?['Responder_x0020_Name/EMail'], it worked for one side of the condition, but for the other side, I had to do a get items and filter array, to make it work.

    There was NO DIFFERENCE between either side of the equation in relation to the lists in question, so I cannot explain why one side worked as an odata query, and the other side would not accept it.

  • Verified answer
    SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,231 on at
    Re: How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

    Do you have single quotes here? 

    SudeepGhatakNZ_0-1667341678040.png

     

  • Tj7933 Profile Picture
    Tj7933 131 on at
    Re: How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

    the quotes were set by Power Automate.  I used the Dynamic value to fill in that part of the equation.

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,231 on at
    Re: How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

    Responder_x0020_Name/EMail eq 'randomname@randomemail.ca'

    Single quotes 

  • Tj7933 Profile Picture
    Tj7933 131 on at
    Re: How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

    Sorry that did not work. Still gave an error.

    I cannot make this work. I have used the column internal name and ensured that I had capitals on the E and M in email, but I still get the error…

    {The expression “Responder_x0020_Name/EMail eq “randomname@randomemail.ca” is not valid. Creating query failed.
    clientRequestId: 820c8f90-634c-4b4f-954c-5903b36fc69b
    serviceRequestId: 820c8f90-634c-4b4f-954c-5903b36fc69b}

     
    I managed to successfully create the filter in one side of my Flow using item()?['Responder_x0020_Name/EMail'] , but when I switch to the other side, the same filter is not acceptable.  This is very confusing, as it is the same list involved on both sides of the condition in the Flow.

    Has Power Automate changed since you originally made this post? Have I missed something else? Do you have any ideas how I can fix this?

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,231 on at
    Re: How to create oData Query for People Picker field? Check to see if a person in one list exists in another list.

    Try

    Person/EMail eq 'person@company.com'

    'E' and 'M' are in uppercase.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard