cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
satya
Helper II
Helper II

Filtering Sharpoint List Data using ODATA with persons field in Flows

i have a Sharepoint list with DelegationFrom(Person field), in flow instead of retrieving all the items i need to retrive the one item.  i added GetItems condition, in filter Query, i have given DelegationFrom eq Person name of another get items. could you please help me how query persons field

 

i am getting error message as below

  "status"400,
  "message""The expression \"DelegationFrom eq venkat patamsetti\" is not valid.\r\nclientRequestId: 9c48198a-848e-4886-8d99-9afde4fab2fb\r\nserviceRequestId: 9242959e-f064-0000-128e-33497451b6e9"

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @satya,

 

I am afraid the Filter Query is not supported for Person Field usage.

To work with Person field in SharePoint List through the REST Call, we need to take use of the $Expand function within OData, while currently only the following is supported:

$filter

$orderby

$top

See reference:

SharePoint connection

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-micsh-msft
Community Support
Community Support

Hi @satya,

 

I am afraid the Filter Query is not supported for Person Field usage.

To work with Person field in SharePoint List through the REST Call, we need to take use of the $Expand function within OData, while currently only the following is supported:

$filter

$orderby

$top

See reference:

SharePoint connection

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Is still not possible ?

It's possible, but a bit fiddly.

 

Our context: getting a name match from the Internal Phone List which is hosted on SharePoint from a form. It's to determine someone's teaching faculty by looking up the Internal Phone List from their form submission.

 

  1. Get the items
    image.png
  2. Use the Filter action so that the Email address from the list, matches the one on the form
    image.png
  3. Use the Select action to fish out the KLA, for this I had to use the expression item()?['Main_x0020_faculty']?['Value'] manually to get the different Main Faculty that the person is assigned to.
    image.png
  4. Did one single run on the flow to get some sample JSON data so that it can be parsed and the KLA map can be shoved into a variable:
    image.png
  5. Finally, write the KLA to the PersonKLA variable:
    image.png

the question and answers are a little old, but I'll add an answer in case anyone else stumbles across this post and thinks they can't use an OData filter and must get all items and then filter on the results.

 

In short, you can filter GetItems on a person column. You can do it by "EMail" (note capitalization), for example e.g. (assume column is called "Person"):

i_power_0-1609858299199.png

 

tcvall86
Advocate I
Advocate I

@i_power 
Thanks for that answer, stumbled on top of this and found your query. Out of curiosity. How did you figure out that it required to be EMail?

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (4,147)