How to Use The Power Apps Combo Box Control?

    Power Apps have various input controls with distinctive properties. One of the most useful controls is the Power Apps Combo box.

    This tutorial will help you understand the Power Apps Combo box control, its properties in Power Apps, and how to use it with various examples.

    We will also talk about some additional Power Apps Combo box-related topics, such as:

    • Power Apps Combobox Items [Manually]
    • Power Apps Combobox Items from Collection
    • Power Apps Combobox Items from SharePoint List
    • Power Apps Combobox Selected Value
    • Power Apps Combobox Default Selected Items
    • Power Apps Combobox Search Text
    • Power Apps Combobox Display Fields
    • Power Apps Combobox Office 365 Users
    • Power Apps Combobox Limitations

    Power Apps Combo Box Control

    • PowerApps Combo box control is a type of control that helps you search for items you will select. This Combobox control looks exactly like a dropdown control allowing users to select from provided choices.
    • Very large data sources do not affect performance as the Search is performed server-side on the SearchField property.
    • Using the PowerApps Combo box control, you can configure single or multiple selections via the SelectMultiple property.
    • By modifying the Layout settings in the Data pane, you can display a single data value, a picture, and a person value for each item.
    • Suppose you want to search for items with any numbers; then you must convert numbers to text with the Text() function. Example: Text(6789).

    Refer to the screenshot below.

    combobox in powerapps

    Power Apps Combobox Properties

    I will show you the key properties of the Power Apps combo box control in the table below.

    PropertyDescription
    DisplayFieldsIt helps to display the list of fields shown for each item returned by the search. You can easily configure it via the properties Data pane
    DisplayModeIt defines whether the control allows user input (Edit), Displays data (View), or is disabled (Disabled)
    DefaultSelectedItemsIf you want to set any default item when a user opens the app, then, in that case, you need to specify that single or multiple items to the Combo box DefaultSelectedItems property
    InputTextPlaceholderWhen no items are selected in the combo box, then this property helps to display the instructional text to end-users
    OnChangeWhen the user changes a selection, it specifies how the app responds
    OnNavigateWhen the user clicks on an item, it specifies how the app responds
    OnSelectWhen the user clicks on control, it specifies how the app responds
    TabIndexIt specifies the Keyboard navigation order in relation to other controls
    SearchFieldsSpecify the field or column that you want to search in the Combobox control
    SelectMultipleIf you change this property value to true, you can select one or more values from the Combo box control. If it is false, then you can only select only one single value from the control
    VisibleThis property defines whether a control appears or is hidden

    Add Power Apps Combobox Items Manually

    Suppose you want to add items manually in the Power Apps combo box, follow the below steps. Such as:

    1. On the Power Apps Screen, insert a Combo box control and set its Items property to the code below.

    Items = ["IT","Finance","HR","Sales","Marketing"]

    Where,

    • “IT”,”Finance”,”HR”,”Sales”,”Marketing”= These items I want to display in the combo box control
    powerapps combobox

    2. Once you Preview the app, you can see all the items available in the Combo box control. You can select a single or multiple items from that control.

    Output:

    powerapps combobox items

    Power Apps Combobox Items from Collection

    In this section, I will show you how to display Power Apps collection items in the Combo box control.

    In Power Apps, I have a collection named “colEmployee,” which contains a single column: [EmployeeName]. Refer to the code below.

    OnStart = ClearCollect(
        colEmployee,
        {EmployeeName: "Henrietta Mueller"},
        {EmployeeName: "Patti Fernandez"},
        {EmployeeName: "Miriam Graham"},
        {EmployeeName: "Johanna Lorenz"}
    )
    power apps combo box items

    Now, I would like to display these collection items/records on the Combo box control. To do so, insert a Combo box control and set its Items property as:

    Items = colEmployee
    combobox powerapps

    This is how we can add collection items to the Power Apps Combo box control.

    Power Apps Combobox Items from SharePoint List

    I have a SharePoint Online list named “Product Details” and this list contains the below fields.

    Column NameData Type
    Product NameIt is a default single line of text
    ManufacturerChoice
    Order DateDate and time
    Delivery DateDate and time
    Power Apps Combobox Items from SharePoint List

    Now, I want to display the SharePoint list column values [Product Name] on the Combo box control. For that, insert a Combo box control and set its Items property as:

    Items = 'Product Details'.Title

    Where,

    • ‘Product Details’ = SharePoint Online list
    • Title = SharePoint text field

    Once you expand the Combo box control, it will display the SharePoint list items, as shown below.

    combo box in powerapps

    This is how we can work with the Power Apps Combo box items from the SharePoint Online list.

    Power Apps Combobox Selected Value

    Suppose you want to display the Power Apps Combo box selected value, insert the Text label, and set its Text property to the code below.

    Text = Concat(
        cmb_Items.SelectedItems,
        'Title' & ","
    )

    Where,

    • cmb_Items = Power Apps combo box control name
    • ‘Title’ = SharePoint text field
    power apps combo box

    Once it is done, Preview the app. Whenever the user selects any value from the Combo box control, it will display on the Text label, as shown below.

    Power Apps Combobox Selected Value

    Power Apps Combobox Default Selected Items

    Next, I will discuss how to set the Power Apps Combo box default selected items with two different examples.

    Example-1:

    I have a Combo box control in Power Apps with these values below. Follow the code below.

    Items = ["Submitted", "Approved", "Rejected", "Pending", "In Progress"]
    combobox items powerapps

    Now, I want to make the Approved as Default selected item that will appear in the Combo box by default. To do so, select the Combo box control and set its DefaultSelectedItems property as:

    DefaultSelectedItems = ["Approved"]
    Power Apps Combobox Default Selected Items

    Example-2:

    Similarly, suppose you want to make multiple items (more than one) as default selected items. In this case, use the below code.

    DefaultSelectedItems = ["Submitted", "Rejected"]
    combo box powerapps

    Note:

    Always remember: When you add multiple items to the Combo box control, you need to make the SelectMultiple property of that control true.

    Power Apps Combobox Search Text

    Suppose you want to search a single field or multiple fields in the PowerApps Combo box control. By default, there is a property called SearchFields to search a single field.

    Power Apps Combobox Search Text

    However, you want to search multiple fields on the Combo box control. In this case, you should change the Layout to Double [Properties pane -> Fields -> Edit -> Layout], as shown below.

    Power Apps Combobox Search Fields

    Also, you should set the Combo box’s SearchField property using the below code.

    SearchField = ["Title","TotalPrice"]

    Where,

    • “Title”,”TotalPrice” = SharePoint lists fields
    power apps combobox items

    Once your updates are done, Save, Publish, and Preview the app. Once the user selects a single or multiple fields on the Search box, the Combo box will display the search results, as shown below.

    power apps combobox

    This way, we can work with the Power Apps Combo box search text/search fields.

    Power Apps Combobox Display Fields

    This section will show you how to display the SharePoint fields [Product Name, Order Date] on the Combo box control. To do so, follow the below steps.

    1. On the Power Apps Screen, insert a Combo box control and set its Items property using the SharePoint list [Product Details].

    2. If you select the Layout as Single, the Combo box will display with a single or one field value. You need to enter the Primary text value of which field you want to display in the Combo box control.

    3. As, I wanted to display the combo box with the Title field (Product Name), So I selected the Primary text as the Title column, as shown below.

    4. Finally, Save, Publish, and Preview the app. Once you expand the Combo box control, it will display the single field values [Product Name], as shown below.

    Power Apps Combobox Display Fields

    5. Similarly, If you select the Layout as Double, the Combo box will display with double field values.

    6. Now, I want to see the Combo box with the Title and Order Date field values, So I selected the Title column in the Primary text field and the Order Date column in the Secondary text field.

    7. There is also a field called SearchField that helps users for searching purposes. That means depending on which column or value the user is searching in the combo box.

    powerapps combobox items from collection

    8. Once all your updates are done, Save, Publish, and Preview the app. Once you expand the Combo box control, you can see all the Product Namename with the Order Date (as we selected Double Layout) within the control, as shown below.

    combobox power apps

    This is how we can work with the Power Apps Combo box display fields.

    Power Apps Combobox Office 365 Users

    I will show you how to work with the Power Apps Combo box Office 365 users. To do so, you should connect the Data source to an Office365Users, as shown below:

    Power Apps Combobox Office 365 Users

    Next, select the Combo box control and set its Items property to the code below.

    Items = Sort(
        Office365Users.SearchUser({searchTerm: cmb_Items.SearchText}),
        DisplayName,
        SortOrder.Descending
    )

    Where,

    • cmb_Items = Combo box control name
    combo box power apps

    Once you expand the Combo box control, you will get the Office 365 users in the Power Apps Combo box control, as shown below.

    selecteditems powerapps

    Power Apps Combobox Limitations

    The Power Apps Combo box control can display up to 500 items. Also, it will only exhibit a subset of 500 items or selection values.

    Moreover, you may like some more Power Apps articles:

    I hope this Power Apps tutorial is helpful. If you have any requirements related to the Power Apps Combo box control, you can follow the above examples to get an idea of how to work with it.

    comment_count comments
    Oldest
    Newest
    Oldest

    Comment as a guest:

    >