cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

sort form card combobox alphabetically

I have a form, one of the data cards of which contains a combobox. The Data->Display Fields value is ["cra6a_sectionarea"]

Is there a good way to sort the drop down values alphabetically?

 

An additional Q I had was whether I could sort by a separate column? Say the display field was still ["cra6a_sectionarea"], but I had a separate column in the same entity, cra6a_sorting, is there a way to sort by that column, while still displaying cra6a_sectionarea as the values?

 

thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: sort form card combobox alphabetically

Use one column for the sort

SortByColumns(Choices([@Projects].'Section Area'),"Section Area")

 

Or

Sort(Choices([@Projects].'Section Area'),'Section Area')

 

Please look at your formula again, that is not how I said. I used" " for Sortbycolumns

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

8 REPLIES 8
Highlighted
Super User
Super User

Re: sort form card combobox alphabetically

Hi @Medoomi 

You would sort the original dataset in the Items property of the combobox by your other column.  You can choose any column in the dataset to display in the window. 

Highlighted
Community Champion
Community Champion

Re: sort form card combobox alphabetically

On the Items property of the Combobox Put:

Sort(Datasource.cra6a_sectionarea),cra6a_sorting)

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Advocate II
Advocate II

Re: sort form card combobox alphabetically

thx @eka24  & @Drrickryp 

I am still not sure what format to use to sort within a combobox.

At present Items = Choices([@Projects].'Section Area')

 

I would like to sort either by 'Section Area', or by the column 'order'

I tried:

Sort(Projects.'Section Area'.Section,'Section Area'.order,Ascending)

but no items displayed.

Any hints how to sort within a combobox within a form?

Highlighted
Community Champion
Community Champion

Re: sort form card combobox alphabetically

Try

SortByColumns(Choices([@Projects].'Section Area'),"Section Area","Order")

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Highlighted
Advocate II
Advocate II

Re: sort form card combobox alphabetically

I tried Items =

SortByColumns(
    Choices([@Projects].'Section Area'),
    'Section Area'.'Section/Area',
    Ascending
)

And it  didn't show an error, however, the drop down didn't sort alphabetically. Sort order was as before.

Is there another place in a form combobox where I need to enter the sorting?

Highlighted
Community Champion
Community Champion

Re: sort form card combobox alphabetically

Use one column for the sort

SortByColumns(Choices([@Projects].'Section Area'),"Section Area")

 

Or

Sort(Choices([@Projects].'Section Area'),'Section Area')

 

Please look at your formula again, that is not how I said. I used" " for Sortbycolumns

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Highlighted
Community Champion
Community Champion

Re: sort form card combobox alphabetically

@Medoomi ,

Just assisting here

SortByColumns(
   Choices(
      [@Projects].'Section Area'
   ),
   "Value"
)
Highlighted
Advocate II
Advocate II

Re: sort form card combobox alphabetically

Thanks so much @eka24  & @WarrenBelz  ... Took me a while to get that one, but I understand now, thx!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,567)