cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grifted5150
Frequent Visitor

Sorting Crop Down Complex Choices

Hello,

 

Right now I have a Drop Down that is displaying Items to select from a list and I would like them to display in ascending order.

 

There is what I have as of right now.

 

Items = Choices(BCUReferrals.FormType)

 

I have heard different things about this being able to work on this type of column.

 

Thank you!

 

-G

2 ACCEPTED SOLUTIONS

Accepted Solutions
Drrickryp
Super User
Super User

@grifted5150 

If this is SharePoint, Sort(BCUReferrals.FormType), Value)

If this Is Dataverse see:  http://powerappsguide.com/blog/post/sort-dataverse-choice-column 

View solution in original post

Drrickryp
Super User
Super User

@grifted5150 

If you start with the gallery items property as a collection of your records, say called: colList, then in the OnSuccess property of the form:

ClearCollect(colList, yourformname.LastItem);
Collect(colList,Sort(List,ID,Ascending);
Navigate(yourfirstscreen)

 

 

View solution in original post

3 REPLIES 3
Drrickryp
Super User
Super User

@grifted5150 

If this is SharePoint, Sort(BCUReferrals.FormType), Value)

If this Is Dataverse see:  http://powerappsguide.com/blog/post/sort-dataverse-choice-column 

grifted5150
Frequent Visitor

This was in a Canvas PowerApp and this worked, Sort(Choices(BCUReferrals.FormType),Value). The only thing is now my default item is at the bottom. Is there a way to have my default first then sort ascending.

Drrickryp
Super User
Super User

@grifted5150 

If you start with the gallery items property as a collection of your records, say called: colList, then in the OnSuccess property of the form:

ClearCollect(colList, yourformname.LastItem);
Collect(colList,Sort(List,ID,Ascending);
Navigate(yourfirstscreen)

 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,358)