cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wi11iamr
Advocate II
Advocate 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
v-bacao-msft
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
v-bacao-msft
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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,262)