Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Cannot sort Gallery based off of radio value through Icon

I have a form that Users submit. One part of that form is a priority radio selection ranging from 1 - 10. 

priority sc.PNG


Within my Gallery I have a list of submitted forms that are able to be sorted via "Title" and "Created" (for date created). This works with the double arrow sort icon double arrow.PNG no issue. I get stuck when I try to do the same sort technique but with the "Priority" value based off of the radio button selections the User did when filling out the form. 


How can I sort my gallery based off of the radio button value from the form?

Super User
Super User


Sorry for the delay!!


For the Priority, you will need to expose the value in a way that you can sort on it.  You can't sort by a choice column directly.


So the formula for the Items property would be:

    AddColumns('Approval List',
        "_priority", Priority.Value


Then change the formula on the priority sort icon to:

Set(varSortColumn, "_priority");
Set(varSortDirection, If(varSortDirection = Ascending, Descending, Ascending))


Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Awesome! That ended up working for me!


There is one bug with the sorting, when sorting the numbers sort (1, 10, 2, 3, 4...) where "10" is between "1" and "2" instead of after "9". Is there something I can do about this?


Other than that, the sorting function works wonderfully. 

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,592)