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

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

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

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

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,056)