cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Touchez7
New Member

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?

8 REPLIES 8
RandyHayes
Super User
Super User

@Touchez7 

I would assume you would be storing the value of the radio control in your data as a number.  So you would simply need to sort on that column in your gallery.

If you have a particular formula that is not giving you what you want, then feel free to share it.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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!
Touchez7
New Member

For the sort columns that are working properly I have:

Sort by Title:

Set(

varSortColumn,

"Title"

);

Set(

varSortDirection,

If(

varSortDirection = Ascending,

Descending,

Ascending

)

)

 

Sort by Date Created:

Set(

varSortColumn,

"Created"

);

Set(

varSortDirection,

If(

varSortDirection = Ascending,

Descending,

Ascending

)

)

 

But when I try to sort by the Priority column that houses the radio selections using the following:

Set(

varSortColumn,

"Priority"

);

Set(

varSortDirection,

If(

varSortDirection = Ascending,

Descending,

Ascending

)

)

 

Everything just disappears and I am left with a blank canvas. Not all of the values are numerical. I have "1-Low", 5-Medium", "10-High" like shown in the original post. I will try to make the values ONLY numerical and see what happens.

RandyHayes
Super User
Super User

@Touchez7 

Yes, but those formulas are all setting variables.  What is the formula for your Items property of your Gallery?

_____________________________________________________________________________________
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!

Still a blank canvas. I checked my SharePoint Lists settings under the Radio section and did not see a way to enforce using numerical values. I am assuming it takes everything as string values? 

The formula for my "Items" property within my Gallery is:

SortByColumns(

'Approval List',

varSortColumn,

varSortDirection

)

RandyHayes
Super User
Super User

@Touchez7 

Thanks for the formula.  

 

So let's focus on your list columns then.  First - what is the "real" name of the column?  

To determine a column's real name, you can click on the column in the List Settings of your list and then in the address bar of your browser, look at the end of the URL - it will show the real name.

 

Next, what is the column type in your list - text, numeric, etc?

OR...have you defined this column as a Choice column?

 

_____________________________________________________________________________________
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!

Real name of the column for the radio selections shows "Field=Priority" at the end of the URL. 

The column list type is "Choice" with the choice display options as "Radio Buttons" 

Touchez7
New Member

Been doing some more research and hopefully this info will help find a solution:

I have a gallery that has different sort buttons. I want one of the buttons to sort based off of the "Choice" selection called "Priority". This column pulled from a SharePoint List and the different choices are the numbers 1-10. 

'Approval List' = SharePoint List Name

'Priority' = SharePoint List Column [Choice]

numbers "1-10" = the different choices within the Choice column

 

How can I get my Gallery to sort my info based off of Priority number using a sort button. ***The default sorting filter will not be based off of 'Priority'***

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,561)