web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sort gallery with Pers...
Power Apps
Unanswered

Sort gallery with Person and group and Title

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Greetings!


I have a requirement wherein I want to sort the gallery by Title or People Picker Field. (Multiple Select)

Now, I have achieved sorting the gallery by the Title field but I cannot sort it by People Picker Field.
I have a Sort icon which has Onstart property as 

UpdateContext({SortColumn:"Title" ,SortDecending: !SortDecending})

and My gallery items property is 

SortByColumns(If( 

Text( ComboBox1.Selected.Result) = "Show All" && Text( ComboBox1_1.Selected.Result) = "Show All" && Text( ComboBox1_2.Selected.Result) = "Show All" && Text( ComboBox1_3.Selected.Result) = "Show All" && Text( ComboBox1_4.Selected.Result) = "Show All",
Talenttracker

 ),SortColumn,If(SortDecending,Ascending,Descending))

 How can i make my gallery sort by Person or Group column( People Picker) column by having an icon for the same.

Categories:
I have the same question (0)
  • SimonPiquer Profile Picture
    255 on at

    Hi,


    I'm not exactly sure what you mean by "I have a Sort icon which has Onstart property as..". Do you want to have a button that you click that switches between person and title? 

     

    Either way, you will need to use AddColumns to add the person-columns name field as a seperate column, since you can't sort on a LookUp column.

     

    So in your case you could change the items property of your gallery to 

     

    SortByColumns(If( 
    
    Text( ComboBox1.Selected.Result) = "Show All" && Text( ComboBox1_1.Selected.Result) = "Show All" && Text( ComboBox1_2.Selected.Result) = "Show All" && Text( ComboBox1_3.Selected.Result) = "Show All" && Text( ComboBox1_4.Selected.Result) = "Show All",
    AddColumns(Talenttracker,"PersonField",PersonColumnName.DisplayName)
    
     ),SortColumn,If(SortDecending,Ascending,Descending))

     

    And then you need define on your button or however you want to solve it that the SortColumn is "PersonField"

     

    UpdateContext({SortColumn:"PersonField" ,SortDecending: !SortDecending})

     

    Am I on the right track?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard