Power Apps Combo Box Set or Get Selected Value

Are you looking to set the Power Apps combo box value? In this Power Apps tutorial, I will explain how to set a Power Apps combo box value based on another combo box. Also, I will show you how to get the Power Apps combobox selected value.

Set Combo Box Value in Power Apps

This section will cover how to set the Power Apps Combo box selected value.

For Example, I have a SharePoint Online list [IT Support Ticket] that has various columns like:

Issue IDTitle
IssueSingle line of text
Issue TypeChoice [“Laptop,” “Network”, Outlook,” “Other”]
TimelineChoice [“Laptop,” “Network,” Outlook,” “Other”]
Issue Handled byLookup

I created a Power Apps Canvas app and added an Edit form. The form contains three Combo box controls.

  1. Issue
  2. Timeline
  3. Issue Assigned To

When a user chooses a value from the “Issue” combo box, the “Timeline” or “Issue Assigned To” combo box automatically selects a corresponding value based on the selected Issue, as shown below:

How to set Power Apps Combo box selected value
Set Combo box selected value in Power Apps

Let’s follow the below steps to achieve this:

  • On the Power Apps screen, insert an Edit form. Then, add a new data source for the above SharePoint list and set the Edit form’s Data source property.

Where,

  1. IT Support Ticket = Datasource name
How to set the selected value of a Power Apps Combo box
  • Select the Timeline Combo box -> Set its DefaultSelectedItems property to:
If(
    DataCardValue3.Selected.Value = "Laptop",
    Table({Value: "4 Days"}),
    If(
        DataCardValue3.Selected.Value = "Outlook",
        Table({Value: "2 Days"}),
        If(
            DataCardValue3.Selected.Value = "Network",
            Table({Value: "2 Days" & " " & "3 Days"}),
            Table({Value: "3 Days"})
        )
    )
)

Where,

  1. DataCardValue3 = Issue Combo box control name
  2. Laptop, Outlook,.. = Issue Combo box values
  3. 4 Days, 3 Days,.. = Timeline Combo box values
Set Power Apps combo box selected value
  • Select the Issue Handled By Combo box -> Set its DefaultSelectedItems property to:
If(
    DataCardValue3.Selected.Value = "Laptop",
    Table({Value: "Chuck"}),
    If(
        DataCardValue3.Selected.Value = "Outlook",
        Table({Value: "Johanna Lorenz"}),
        If(
            DataCardValue3.Selected.Value = "Network",
            Table({Value: "Dan"}),
            Table({Value: "Serena"})
        )
    )
)

Where,

  1. DataCardValue3 = Issue Combo box control name
  2. Laptop, Outlook,.. = Issue Combo box values
  3. Chuck, Johanna Lorenz,.. = Issue Handled By Combo box values
Set the selected value of a Power Apps Combo box
  • Once your app is ready, Save, Publish, and Preview the app when the user selects a value from the “Issue” Combo box. Then, the other combo box will automatically select a corresponding value based on the selected Issue.
Power Apps set the selected value of a Combo box

As mentioned above, I covered how to set the Power Apps combo box selected value.

Power Apps Get Combo Box Selected Value

Here, we will see how to get the Power Apps combo box selected value to a text label.

As per the above steps, we saw how to set the Power Apps combo box selected value. Now, we can utilize those Combo box selected values and get those selected values in a text label control as shown below:

Let’s follow the below steps to achieve this:

  • For the Issue Combo box control, Insert the Text label control -> Set its Text property as:
Concat(DataCardValue3.SelectedItems,Value,",")

Where,

  1. DataCardValue3 = Combo box control name
How to get Power Apps Combo box selected value
  • Once your app is ready, Save, Publish, and Preview the app when the user selects a value from the Issue Combo box control. Then, we will get the selected value in a text label control as shown below:
Get the selected value of a Power Apps Combo box

This is how to get the combobox selected value in Power Apps.

Conclusion

In this tutorial, I have explained how to set Power Apps combobox value based on another combobox. Also, I have shown you how to get the Combo box selected value in Power Apps.

You may like the following tutorials: