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

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

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

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

wi11iamr
Level: Powered On

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
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
Users Online
Currently online: 274 members 4,955 guests
Please welcome our newest community members: