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
Advocate I
Advocate I

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,287)