cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LeeB_CDN
Helper III
Helper III

Sort Table created within the Items Property on ComboBox

Hello, 

 

Does anyone have a solution for this? (besides putting the items into a collection...) 

 

I am trying to sort a ComboBox which has the selections programmed directly into the Items Property: 

Sort(["Series 40","Series 40","Series 40","502A/D","502A/D","502A/D","5453-624II","5453-624II"], Ascending)

This throws an error of course, but it would be convenient if there was a way to sort these entries in Ascending order starting with numbers then letters... 

 

Is this possible from within the items property? 

 

Thanks in advance!  

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @LeeB_CDN :

Please try:

Sort(["Series 40","Series 40","Series 40","502A/D","502A/D","502A/D","5453-624II","5453-624II"],Value, Ascending)

Best Regards,

Bof

View solution in original post

2 REPLIES 2
jblomberg
Helper II
Helper II

Hi @LeeB_CDN !

 

I'm not entirely sure if I follow you, because this formula in the Items property of a combobox doesn't throw an error if I try it.

Sort(["Series 40","Series 40","Series 40","502A/D","502A/D","502A/D","5453-624II","5453-624II"], Ascending)

I wonder, though... Are you gonna hard-code all the items of the combobox? If so, sorting isn't even necesarry, you just put the items between [ ] in the right order and you're done.

 

Now I'm getting the feeling I slightly misunderstood, so please elaborate and we'll probably figure out what you need. 

 

- jblomberg

 

PS. The Table()-function is the equivalent of a collection, used only in one place (like a combobox's Items property). You'd get something like this:

Sort(Table({item: "Series 40"},{item: "Series 40"},{item: "Series 40"},{item: "502A/D"},{item: "502A/D"},{item: "502A/D"},{item: "5453-624II"},{item: "5453-624II"}),Ascending)

I used 'item' as the column name, but it doesn't really matter how you call it.

v-bofeng-msft
Community Support
Community Support

Hi @LeeB_CDN :

Please try:

Sort(["Series 40","Series 40","Series 40","502A/D","502A/D","502A/D","5453-624II","5453-624II"],Value, Ascending)

Best Regards,

Bof

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,434)