cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Sort gallery with variable on 2nd argument

Hello,

 

And Happy 2021 to everyone!

 

Does anyone know if the Sort function accepts a variable on the 2nd argument?

 

For example:

MyVar is: "ColumnA"

 

And I want to sort a gallery based on that column with:

Sort(MySPList, MyVar, Ascending)

 

The value of MyVar changes depending on the icon a user clicks next to every column of the gallery.

 

But although the text is changing correctly each time the user clicks on one of the icons, the Sort function of the gallery isn't responding.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Please check this Post:

https://powerusers.microsoft.com/t5/Building-Power-Apps/SortByColumns-and-using-variable-sort-column...

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

1 REPLY 1
Super User III
Super User III

Please check this Post:

https://powerusers.microsoft.com/t5/Building-Power-Apps/SortByColumns-and-using-variable-sort-column...

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (78,822)