cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jesheehy
Level: Powered On

Get Items Filter Query by user DisplayName

I want to apply a filter query to the Get Items action for specific users based on the DisplayName. I have fields on the list that are of the User/Group type. For example, I have a field called Requested By that is a User/Group field. I have tried Requested_x0020_By eq 'John Doe', but that returns 0 results. When I look at what is returned by the Get Items query, the Requested By block has the entire object:

 

"Requested_x0020_By": {
  "@odata.type": 
  "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
  "Claims": "i:0#.f|membership|jdoe@company.com",
  "DisplayName": "John Doe",
  "Email": "john.doe@company.com",
  "Picture": "https://company.sharepoint.com/product/_layouts/15/UserPhoto.aspx?&Size=S&AccountName=john.doe@company.com",
  "Department": "ABC",
  "JobTitle": Manager
}

Is what I'm trying to do possible?

 

John

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Get Items Filter Query by user DisplayName

Hi @jesheehy,

 

No, it is not possible baed on what I know.

 

See my posts in the following thread:

How to Get Items Filter by Dynamic content

 

Quoted:

"

It seems you are trying to query the People or group field using OData filter.

Currently that is not supported, as the document states:

"

Query for users

In the SharePoint REST service, users are represented by the user's friendly (display) name, and not their alias or domain\alias combination. Therefore, you must construct user queries against users' friendly names.

Note:

 Membership-based user queries are not supported.

Usage of the Current operator to do queries using the ID of the current user is not supported.

"

You may take a look at the details for query option in the TechNet WIKI below:

SharePoint 2013: Using REST API For Selecting, Filtering, Sorting And Pagination in SharePoint list

 

Further, using the $expand option should be able to get the People or group field details in OData query, but currently this is not supported under the SharePoint Get items Action:

SharePoint 2013: Get User Details from Person or Group field using REST API

If you would like this option to be supported under the SharePoint Get Items action, then please consider submit this as an idea.

 

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

3 REPLIES 3
Community Support Team
Community Support Team

Re: Get Items Filter Query by user DisplayName

Hi @jesheehy,

 

No, it is not possible baed on what I know.

 

See my posts in the following thread:

How to Get Items Filter by Dynamic content

 

Quoted:

"

It seems you are trying to query the People or group field using OData filter.

Currently that is not supported, as the document states:

"

Query for users

In the SharePoint REST service, users are represented by the user's friendly (display) name, and not their alias or domain\alias combination. Therefore, you must construct user queries against users' friendly names.

Note:

 Membership-based user queries are not supported.

Usage of the Current operator to do queries using the ID of the current user is not supported.

"

You may take a look at the details for query option in the TechNet WIKI below:

SharePoint 2013: Using REST API For Selecting, Filtering, Sorting And Pagination in SharePoint list

 

Further, using the $expand option should be able to get the People or group field details in OData query, but currently this is not supported under the SharePoint Get items Action:

SharePoint 2013: Get User Details from Person or Group field using REST API

If you would like this option to be supported under the SharePoint Get Items action, then please consider submit this as an idea.

 

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

jesheehy
Level: Powered On

Re: Get Items Filter Query by user DisplayName

Thanks. I'll add this as a requested item. For now, I've implemented a workaround by creating an array of the user's information since that is available in the dynamic content. I can then loop over the array to get the distinct values I need.

unislacker
Level: Powered On

Re: Get Items Filter Query by user DisplayName

Hey I had a similar issue where i wanted to create a personalized email containing all tasks. So I just used a Filter Array after I call the items. Worked fine for me. See Screen shot below. Filter bu user name.PNG

 

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,285)