Power Apps Combo Box Sort [With Examples]

Did you know how to sort Power Apps Combo box items? If Not, No Worries!

In this Power Apps tutorial, I will explain “How to sort Power Apps combo box items

Moreover, I will show you about Power Apps sorting Combo box items manually and also how to sort Power Apps Combo box items using a SharePoint list.

Also, I will describe the Power Apps combo box sort distinct, and additionally, I will cover:

  • How to sort the Power Apps combo box choice field
  • Sort Power Apps combo box date field
  • How to sort the Power Apps combo box items alphabetically
  • Power Apps sort combo box search Office365Users
  • How to sort the Power Apps combo box selected items

How to sort Combo box items in Power Apps

In this section, I will show you how to sort Power Apps combo box items in two different scenarios:

  • Sort Power Apps Combo box items in Power Apps [Manually]
  • Sort Power Apps Combo box items in Power Apps [Using SharePoint list]

Sort Power Apps Combo box items [Manually]

Here, I will explain how to sort Power Apps combo box control containing manually added items.

Example,

I have created a Power Apps Canvas app and then added a Combo box control that contains the “Employee Names” [Which I added manually]. Next, Whenever the user expands the combo box control, I need to arrange those combo box values in ascending order [A to Z], as in the screenshot below.

Power Apps sort Combo box

Follow the below steps to achieve this:

  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Sort(
    [
        "Aiden",
        "Anthony",
        "Emma",
        "Emily",
        "Lily",
        "Blair",
        "Liar"
    ],
    Value,
    SortOrder.Ascending
)

Where,

  • Aiden, Anthony, and many more.. = The combo box items which we added manually.
Power Apps Combo box sort
  • SavePublish, and Preview the app. Now, the combo box control contains manually added items sorted in ascending order.
Sort Power Apps combo box

This is how to sort the Power Apps combo box control, which contains manually added items sorted in ascending order.

Sort Power Apps Combo box items [Using SharePoint list]

Here, I will explain how to sort Power Apps combo box items which is connected to a SharePoint list.

I have a SharePoint list [Customer Details], that has various columns like:

Column Name Data Type
User NameTitle
CountrySingle line of text
Subscription TypeChoice [“Premium”, “Standard”, “Basic”]
DeviceChoice [“Smartphone”, “Smart TV”, “Laptop”, “Tablet”
Subscription End DateDate and time
Subscription Handled ByPerson or group
How to sort Power Apps combo box control

I have created a Power Apps Canvas app and then added a Combo box control by connecting to the above SharePoint list column [Country]. Next, Whenever the user expands the combo box control, I need to arrange those combo box values in descending order [Z to A], as in the screenshot below.

Power Apps sort Combo box items

Follow the below steps to achieve it:

How to sort Power Apps combo box items
  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Sort(
    'Customer Details',
    Country,
    SortOrder.Descending
)

Where,

  • Customer Details = SharePoint list name
  • Country = SharePoint list column name
How to sort combo box items in Power Apps
  • SavePublish, and Preview the app. Now, the combo box control contains items from the SharePoint list which are sorted in descending order [Z-A].
Sort combo box items in Power Apps

This is how we can sort Power Apps combo box items using a SharePoint list.

In the above image the Power Apps combo box contains the duplicate values, which are sorted in descending order.

Let me show you how we can use a distinct keyword with a sort function:

Power Apps Combo box sort distinct

In this section, I will show you how to sort a Power Apps combo box control without using duplicate values.

Example,

  • I will take the same example above; whenever the user expands the combo box, the control contains values sorted in descending order without duplicate values.
powerapps sort combobox alphabetically

Follow the below steps to achieve it:

  • Select the Power Apps Combo box control -> Set its Items property to:
Sort(
    Distinct(
        'Customer Details',
        Country
    ),
    Value,
    SortOrder.Descending
)
powerapps sort combobox alphabetically
  • SavePublish, and Preview the app. Now, the combo box control contains items from the SharePoint list without duplicate values and is sorted in descending order.
Sort and distinct Power Apps combo box

This is how to use a Power Apps combo box control sort distinct.

Power Apps sort Combo box choice field

In this section, I will show you how to sort the Power Apps combo box connected to a SharePoint list choice field.

Example

I created a Power Apps Canvas app and then added a Combo box control connected to the above SharePoint list choice column [Device]. Whenever the user expands the combo box control, I need to arrange those combo box values in ascending order [A to Z], as in the screenshot below:

sort combobox alphabetically power apps

To achieve it, follow the below steps:

  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Sort(
    Choices('Customer Details'.'Device'),
    Value
)

Where,

  • Customer Details = SharePoint list name
  • Device = SharePoint list choice column name
Power Apps sort combo box items choice field
  • SavePublish, and Preview the app. Now, the combo box control contains items from the SharePoint list choice column and is sorted in ascending order.
sort combobox alphabetically power apps

This is how to sort the Power Apps combo box connected to a SharePoint list choice field.

Power Apps sort Combo box date field

In this section, I will show you how to sort the Power Apps combo box connected to a SharePoint list date field.

Example

I created a Power Apps Canvas app and then added a Combo box control connected to the above SharePoint list date column [Subscription End Date]. Whenever the user expands the combo box control, I need to arrange those combo box values in ascending order [A to Z], as in the screenshot below:

Power Apps sort combo box items date field

To achieve it, follow the below steps:

  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Distinct(
    Sort(
        'Customer Details'.'Subscription End Date',
        'Subscription End Date'
    ),
    Text(
        'Subscription End Date',
        "[$-en-US]dd/mm/yyyy"
    )
)

Where,

  • Customer Details = SharePoint list name
  • Subscription End Date = SharePoint list date column name
sort combobox alphabetically power apps
  • SavePublish, and Preview the app. Now, the combo box control contains items from the SharePoint list date column and is sorted in ascending order.
Power Apps sort combo box value

This is how we can sort the Power Apps combo box which is connected to a SharePoint list date field.

Sort Power Apps Combo box alphabetically

In this section, I will show you how to sort the Power Apps combo box alphabetically.

Example:

Manually, I have created a Power Apps collection, i.e., [colComboBox]. This collection contains the below respective records:

Power Apps combo box sort items

In Power Apps, there is a Combo box control, and I want to sort and display the specific collection column values [Product] in ascending order [A-Z].

Refer to the below image:

Sort Power Apps combo box alphabetically

To achieve it, follow the below steps:

  • On the Power Apps screen’s OnVisible property -> Provide the below code to create a collection:
Collect(
    colComboBox,
    {Product: "Laptop"},
    {Product: "SmartPhone"},
    {Product: "Sofa"},
    {Product: "Refrigerator"},
    {Product: "Smart TV"}
)

Where,

  • colComboBox = Provide the collection name
  • Product = The collection column name
  • Laptop, SmartPhone.. = Collection column values
Power Apps combo box sort values alphabetically
  • On the Power Apps screen, Insert a Combo box -> Set its Items property to:
Sort(
    colComboBox,
    Product,
    SortOrder.Ascending
)

Where,

  • colComboBox = Provide the collection name
  • Product = The collection column name
  • SavePublish, and Preview the app. Now, the combo box control contains items from the collection and is sorted in ascending order.
Combo box sort alphabetically in Power Apps

This is how to sort the Power Apps combo box connected to a Power Apps collection.

Power Apps sort Combo box search Office365Users

Here, I will show you how to sort the Power Apps combo box control connected to Office365Users.

Example,

I have created a Power Apps Canvas app and then added a Combo box control that is connected to Office365Users. Next, Whenever the user expands the combo box control, I need to arrange those combo box Office365Users names in descending order [Z to A], as in the screenshot below:

Sort Power Apps combo box with Office365Users

To achieve it, follow the below steps:

  • Create a Power Apps Blank canvas app -> Connect the Data source to an Office365Users as shown below:
Power Apps combo box sort Office365Users
  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Sort(
    Office365Users.SearchUser({searchTerm: cmb_Office365Users.SearchText}),
    DisplayName,
    SortOrder.Descending
)

Where,

  • cmb_Office365Users = Combo box control name
Sorting a Power Apps combo box control
  • SavePublish, and Preview the app. Now, the combo box contains the Office365Users and is sorted in descending order.
Power Apps sort combo box items with Office365Users

This is how to sort the Power Apps combo box control connected to Office365Users.

Power Apps combo box sort selected items

In this section, I will show how to sort the Power Apps combo box selected items.

Example,

I have a SharePoint list [Loan Approval], that has various columns like:

Column NameData Type
NameTitle
Loan Applied DateDate and time
Loan TypeChoice [“Home loan”, “Car Loan”, “Gold loan”]
Power Apps sort combo box Selected Item

I created a Power Apps Canvas app and then added an Edit form connected to the above SharePoint list. In the Edit form, there is a Combo box control, Whenever the user selects multiple items from it and clicks on a button control.

How to sort combo box selected item in Power Apps.

Those selected multiple items will be saved to a SharePoint list choice column in ascending order [A-Z] as shown below:

Sort Power Apps combo box selected item

To achieve it, follow the below steps:

  • On the Power Apps screen, insert an Edit form -> Set its Data source property to:
'Loan Approval'

Where,

  • Loan Approval = SharePoint list name
How to sort Power Apps combo box values
  • Insert the Button control -> Set its OnSelect property to:
Patch(
    'Loan Approval',
    Defaults('Loan Approval'),
    {
        Title: DataCardValue1.Text,
        'Loan Applied Date': DataCardValue9.SelectedDate,
        'Loan Type': Sort(DataCardValue2.SelectedItems,Text(Value),SortOrder.Ascending)
    }
);

Where,

  1. Loan Approval = SharePoint list name
  2. Title = SharePoint list title column
  3. DataCardValue1 = Power Apps text-input control name
  4. Loan Applied Date = SharePoint list column name
  5. DataCardValue9 = Power Apps date picker control name
  6. Loan Type = SharePoint list column name
  7. DataCardValue2 = Power Apps combo box control name
Sort combo box selected item in Power Apps
  • SavePublish, and Preview the app. When the user selects multiple values in a combo box control and clicks on a button control.
Power Apps combo box sort selected items
  • Those selected items will be saved to a SharePoint list in ascending order [A-Z] as shown below:
How to sort Power Apps combo box Selected Item

This is how to sort the Power Apps combo box selected items.

Conclusion

In this Power Apps tutorial, I have explained how to sort the Power Apps combo box with an example.

We have also learned how Power Apps sorts Combo box items manually and how to sort Power Apps Combo box items using a SharePoint list.

By following this tutorial, you have got the complete information:

  • Power Apps Combo box sort distinct
  • How to sort the Power Apps combo box choice field
  • Sort Power Apps combo box date field
  • How to sort the Power Apps combo box items alphabetically
  • Power Apps sort combo box search Office365Users
  • How to sort the Power Apps combo box selected items

You may also like: