cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Resident Rockstar
Resident Rockstar

How to do a ODATA filter for a people picker name

I want to get the email out of people picker in an ODATA search.  

 

I currently have this odata filter:

 

image.png

I get this error:

 

 

 

{
  "status": 400,
  "message": "The expression \"SW_DocumentID eq 9670 and Part_x0020_Number eq  '204085' and Rev eq 5 and Engineer eq i:0#.f|membership|rmartin@company.com\" is not valid. Creating query failed.\r\nclientRequestId: 85c0338c-45c5-4eb2-8575-fc848f475a9f\r\nserviceRequestId: 85c0338c-45c5-4eb2-8575-fc848f475a9f"
}

 

 

I want to get the email out of people picker in an ODATA search.  

 

Engineer is an email. I'm sure that the UserName Claims

2 ACCEPTED SOLUTIONS

Accepted Solutions
abm
Super User III
Super User III

Hi @martinav 

 

To extract the email address you need the following

 

items('Apply_to_each')?['Assign_x0020_To']?['Email']
 
Above Assign To is my people picker field name.
 
So in your case add a compose and add the expression below
 
items('Apply_to_each')?['UserName_x0020_Claims ']?['Email']
 
Thanks


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

abm
Super User III
Super User III

Hi @martinav 

 

Unfortunately you won't be able to do that. The only option is retrieve all and compare by adding an IF condition.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User III
Super User III

Hi @martinav 

 

To extract the email address you need the following

 

items('Apply_to_each')?['Assign_x0020_To']?['Email']
 
Above Assign To is my people picker field name.
 
So in your case add a compose and add the expression below
 
items('Apply_to_each')?['UserName_x0020_Claims ']?['Email']
 
Thanks


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

martinav
Resident Rockstar
Resident Rockstar

A little follow up on this one.  I need a way to also select the email from the people picker on the left side.  Just setting these two equal does not work.  I'm not sure why.  But, I will need to get the email out of both to satisfy the filter.  

 

In short... these are TWO people picker fields...  How do I set an equality to get it to work...  Maybe I should have asked it this way from the start.

 

Simplistically:

 

Engineer eq '@{items('Apply_to_each_8')?['UserName']?['Email']}'

 

How do I pull email out of the left side?  Or write it differently to get the equality to work.  Engineer AND UserName are both people picker fields.

 

Thank you. 

abm
Super User III
Super User III

Hi @martinav 

 

Unfortunately you won't be able to do that. The only option is retrieve all and compare by adding an IF condition.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

martinav
Resident Rockstar
Resident Rockstar

Oh, yea.  If statement.  I should have thought of that!


Thanks much!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (13,378)