cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: How to do a ODATA filter for a people picker name

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 blog

Power Automate Video Tutorials

View solution in original post

Highlighted
Super User III
Super User III

Re: How to do a ODATA filter for a people picker name

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 blog

Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: How to do a ODATA filter for a people picker name

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 blog

Power Automate Video Tutorials

View solution in original post

Highlighted
Resident Rockstar
Resident Rockstar

Re: How to do a ODATA filter for a people picker name

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. 

Highlighted
Super User III
Super User III

Re: How to do a ODATA filter for a people picker name

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 blog

Power Automate Video Tutorials

View solution in original post

Highlighted
Resident Rockstar
Resident Rockstar

Re: How to do a ODATA filter for a people picker name

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


Thanks much!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,497)