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 / Can't get a  simple So...
Power Apps
Answered

Can't get a  simple Sort function to work

(0) ShareShare
ReportReport
Posted on by 181

Hi,

 

I am working on a quite big app for Project management. One of our items is to defin which of the Global Goals we are supporting with the actual project. I have a Sharepoint field with the 17 goals listed like "01. No poverty"; "02. No hunger" etc. When the user picks the proper items I want to show the chosen values in a Gallery which sorts the values in ascending order from 01 to 17.

I have a dropdown Combobox with the goals in text, which is a Choices field from SP, and then I have the Items property in the Gallery set like this:  Sort(Globala_mal_value.SelectedItems.Value;Ascending) and the result looks like in the attached pic.
The results are displayed in the order the User picked them.

How should I get them sorted?

 

Best,
Lennart

Sort error.png
Categories:
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @LennartWalldén ,

     

    That is not difficult, just notice the syntax the sort function. Please modify the code as follows.

     Sort(Globala_mal_value.SelectedItems;Value;Ascending)

    Sik

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard