Power Apps check if a Combo box is empty

Have you worked on a scenario like how to check if the Power Apps combo box is empty? In this Power Apps tutorial, I will explain about “Power Apps check Combo box empty”

For that, I created a form containing the Dropdown control (Vendors) and a Power Apps Combo box control (Products). When a user selects a value from the dropdown control, the combo box control will display the product’s name based on the selected vendor.

And if the selected vendor doesn’t have the products, the “Combo box will have empty values” and display the text as “Currently products are not available”.

Power Apps check Combo box empty

This section will show you how to check if a Power Apps combo box is empty.

Example,

I have two SharePoint lists, namely:

  1. Vendor
  2. Product List

Vendor

This SharePoint list has a column like:

Column NameData Type
VendorsTitle
Power Apps combo box empty value

Products

This SharePoint list has columns like:

Column NameData Type
NameTitle
VendorsLookup [The column retrieved from Parent Table “Vendor”]
Power Apps check if the Combo box is empty

Using the above SharePoint list, we will create a blank canvas app. The Power Apps screen will have a dropdown control and a combo box control.

There is no way to verify if the Power Apps combo box is empty. However, we’ve worked on an alternative method by setting a variable to determine if the combo box is empty.

When a user selects a value from the “Vendors” dropdown control, the “Products” combo box control will display the product names based on the selected vendor.

Check Power Apps if combo box is empty

And if the selected vendor doesn’t have the products, the combo box will have empty values and display the text as “Currently Products are not available“.

Power Apps check Combo box empty value

To achieve it, follow the below steps:

Power Apps check if the Combo box is empty
  • On the Power Apps screen, insert a Dropdown control -> Set its Items property to:
Vendor.Title

Where,

  • Vendor = SharePoint list name
  • Title = SharePoint list title column
!IsBlank() and !IsEmpty() for a Power Apps combo box
  • Set the Dropdown control, OnChange property to:
Set(
    CountValue,
    CountRows(
        Filter(
            'Product List',
            Vendors.Value = drp_Vendors.Selected.Title
        )
    )
)

Where,

  1. CountValue = Variable name
  2. Product List = Child SharePoint list name
  3. Vendors = Child SharePoint list column name
  4. drp_Vendors = Dropdown control name
  5. Title = Child SharePoint list title column
PowerApps check if the Combo box is empty
  • Insert a Combo box control -> Set its Items property to:
Filter(
    'Product List',
    Vendors.Value = drp_Vendors.Selected.Title
).Title

Where,

  1. Product List = Child SharePoint list name
  2. Vendors = Child SharePoint list column name
  3. drp_Vendors = Dropdown control name
  4. Title = Child SharePoint list title column
check if Combo box is empty power apps
  • Under Combo box control, insert another Text label control -> Set its Text property to:
If(
    CountValue = 0,
    "Currently Products are not available",
    ""
)

Where,

  1. CountValue = First label control name
check if Combo box is empty powerapps
  • SavePublish, and Preview the app. Upon a user selecting a value from the dropdown control, if the combo box is empty, the text label will display as “Currently Products are not available“.
Power Apps check if the Combo box is empty

This is how we can handle the Power Apps Combo box being empty.

Conclusion

I hope you now have an idea of “Power Apps check if the Combo box is empty. ” I have explained how to check if a Power Apps combo box is empty with examples.

You may also like: