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

Sort By complex field (Author DisplayName) in SharePoint GetItems

Hi there,

 

Within my flow I am able to sort the output of a SharePoint GetItems by using simple fields such as dates etc.

I would however like to sort by a Person field as well, specifically "Author", and while my Flow runs without errors when I add "Author asc, Inspection_x0020_Date asc" to my "Order By" section, it has no bearing on the final result which I consolidate in a Create HTML method for sending in an email.

 

I've tried using Author.DisplayName but this returns an error so by implication I understand that the code for "Author asc" should be fine, yet in my eventual email that I receive the items are sorted only by the Inspection_x0020_Date.

 

Could it be that the Create HTML method discards my Order By from the Get Items method? Is there a way in which to set the Order By for the Output within the Create HTML method?

FlowSortByPerson.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Sort By complex field (Author DisplayName) in SharePoint GetItems

Hi @wi11iamr ,

 

I did the test on my side, and using Author to sort is workable.

I sorted by Author and Title and got the expected results.

32.PNG30.PNG31.PNG

You could try to configure the fields you want to display directly in Create HTML table action.

Please try again.

 

Best Regards,

Community Support Team _ Barry
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Sort By complex field (Author DisplayName) in SharePoint GetItems

Hi @wi11iamr ,

 

I did the test on my side, and using Author to sort is workable.

I sorted by Author and Title and got the expected results.

32.PNG30.PNG31.PNG

You could try to configure the fields you want to display directly in Create HTML table action.

Please try again.

 

Best Regards,

Community Support Team _ Barry
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
Helper II
Helper II

Re: Sort By complex field (Author DisplayName) in SharePoint GetItems

Thanks @v-bacao-msft , I don't know what to say, I haven't changed anything but it appears to be working now. Prehaps just refreshing helped, or rather maybe just cleaning my glasses 😉

 

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (8,252)