cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted
Advocate I
Advocate I

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.

Advocate I
Advocate I

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (12,122)