cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.
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.
Highlighted
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 ;-)

 

 

>