Check if Power Apps Combobox has a selected value

Did you know how to check if the Power Apps combo box is empty? In this Power Apps tutorial, I will show you how to check if Power Apps combobox has a selected value.

Check if Power Apps Combobox has a selected value

This section will show two scenarios for checking if the combo box has a selected value in Power Apps.

Scenario 1

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

Column NameData Type
NameTitle
VendorsLookup
Combo box selected value in Power Apps

On my Power Apps screen, there is a Combo box control that contains the values from the above SharePoint list [Vendor] title column.

When a user doesn’t select any value from the Power Apps combo box control, the text label will display as “Blank”.

Check if Power Apps Combobox has a selected value

Else, if the user selects a value from a combo box control, the text label will display as “Not Blank”

Check if the Combo box has selected value in Power Apps

Let me show you how you achieve this:

  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Distinct('Product List',Title)

Where,

  1. Product List = SharePoint list name
  2. Title = SharePoint list title column
Power Apps check if Combo box has selected value
  • Insert Text label control -> Set its Text property to:
If(
    IsEmpty(Cmb_Product.SelectedItems) || IsBlank(Cmb_Product.SelectedItems) || Len(Cmb_Product.Selected.Value) <= 0,
    "Blank",
    "Not Blank"
)

Where,

  • Cmb_Product = Combo box control name
How to check if the Power Apps Combo box has selected value
  • SavePublish, and Preview the app. When a user doesn’t select any value from the Power Apps combo box control, the text label will display as “Blank”.
Power Apps how to check if Combo box has selected value

This is how to check if the Power Apps combo box has a selected value.

Scenario 2

In my Power Apps screen, there is an Edit form that is connected to the above SharePoint list.

When the user doesn’t select any value from the Power Apps combo box control, the button control won’t be visible.

Combo box check if selected value in Power Apps

Otherwise, if the user selects a value from the Power Apps combo box control the button control will be visible.

How to check the Power Apps Combo box has selected value

To achieve this, follow the below steps:

  • On the Power Apps screen, insert an Edit form -> Connect the DataSource to the above SharePoint list.
'Product List'

Where,

  • Product List = SharePoint list name
Power Apps Combo box check if selected value
  • In the Edit form, insert a Button control -> Set its DisplayMode to:
If(
    IsBlank(DataCardValue4.Selected),
    DisplayMode.Disabled
)

Where,

  • DataCardValue4 = Combo box control name
How to check Power Apps Combo box selected value
  • SavePublish, and Preview the app. When a user doesn’t select any value from the Power Apps combo box control, the button control will be invisible.
Combo box check selected value in Power Apps.

This is how to check if the Power Apps combo box has a selected value based on a button control.

Conclusion

I hope you got to know now how to check if Power Apps Combobox has a selected value.

You may also like: