How to Validate Power Apps Combo Box Control?

While working with the Power Apps form, we need to validate the users’ information to ensure their entry is valid. In this tutorial, I will explain how to validate Power Apps combo box control by showing different examples.

Validate Power Apps Combo Box Control

Here, I have a Power Apps form for employees to submit their expense reports. Within the form, there is a combo box control for selecting an expense category; while submitting the form, employees must select a category.

Now, to validate this combo box control, I will explain three different ways,

  • Validate the Power Apps combo box control with a check and cancel Icons.
  • Validate combo box control by showing an error message.
  • Validate the combo box control by disabling the submit button.

Power Apps Combo Box Validations With Icons [Check & Cancel]

Look at the example below. When I’m not selecting any option in the expense category combo box control in the Power Apps form, the cancel icon is displayed. If selected, the check icon is displayed.

how to validate power apps combo box

To achieve this, follow the steps below!

1. Add a Check Icon from the +Insert tab in Power Apps. Then, provide the below formula in its Icon property.

Icon: If(IsBlank(DataCardValue10.Selected.Value),Icon.Cancel,Icon.Check)

Here, DataCardValue10 is the expense category combo box control name within the Power Apps form.

The above formula will make the check and cancel icon visible based on the combo box value. This means if the selection is empty, the cancel icon will be visible; if not, the check icon will be visible.

validate power apps combo box control

2. To change the back ground color for the icons according to the condition, provide the below formula in the Fill property of the Icon.

Fill: If(IsBlank(DataCardValue10.Selected.Value),Color.Red,Color.Green)
power apps combo box control validation with icons

Now, save the changes and preview the app once. While submitting the data, you can see the Icons will be displayed according to the conditions we have provided.

Let’s see another way of validating the Power Apps combo box control.

Display a Message if Power Apps Combo Box Value is not Selected

In the example below, you can see if the combo box control in the Power Apps form is empty, then an error message is displayed. If not, the error message is hidden.

combo box validation in power apps

To achieve this type of validation on Power Apps combo box control. Follow the steps below!

1. In the Power Apps form, by default, you have an Error Message text label within the expense category Data Card. Provide the below message in the Text property of that Error Message text label.

Text: "Please Choose an Option in Expense Category"
combo box validation in power apps with error message

2. To hide and display the error message based on combo box selection, provide the formula below in the Visible property of the Error Message text label.

If(IsBlank(DataCardValue10.Selected.Value),true,false)

Here, DataCardValue10 is the expense category combo box control name within the Power Apps form.

validations on power apps combo box

3. Now, save and publish the app. If you have not selected a value in the Power Apps combo box control when submitting the details, an error message will be displayed.

Now let’s see the third way of validating the Power Apps combo box control.

Disable Button if Power Apps Combo Box Value is Not Selected

Here, you can see the submit button is in disable mode until I select an option from the Power Apps combo box control.

validate combo box is not blank in power apps

Follow the steps below to achieve this!

1. To validate the Power Apps combo box control, provide the formula below in the button control’s DisplayMode property.

If(IsBlank(DataCardValue10.Selected.Value),DisplayMode.Disabled,DisplayMode.Edit)

This formula will change the submit button’s display mode to edit only if we select an item in the combo box control. Otherwise, it will be in disable mode.

validation on power apps combo box control

2. Save the changes and preview the app once. When submitting the report, the submit button’s display mode will be disabled until we select an option in the expense category combo box control.

I hope you understand how to validate Power Apps combo box control in different ways from this article.

You can follow this article while you’re performing form validations in Power Apps. I have explained three different ways of performing validations; you can apply these formulas according to your requirements.

Also, you may like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…