How to Work With Power Apps Dropdown Blank Values

Do you ever work with blank values within the Power Apps dropdown control? If not, then this Power Apps Tutorial will help you to get ideas on how to work with blank values within the Power Apps dropdown control. We will also discuss topics below, such as:

  1. powerapps dropdown with blank
  2. powerapps dropdown remove the blank value
  3. powerapps dropdown null value
  4. powerapps dropdown add empty value
  5. powerapps dropdown allows empty selection
  6. powerapps dropdown add blank default
  7. powerapps dropdown reset to blank

Power Apps dropdown with blank

In this section, we will see how to add a blank value to the Power Apps dropdown control. That means the dropdown will come with an empty or blank value with the rest of the items like below:

PowerApps dropdown with blank
PowerApps dropdown with blank

We have used the above SharePoint list’s color column on the dropdown list. To add an empty value within the dropdown control, the following steps are:

  • On the Power Apps screen, we will create a collection that will hold the column value with an empty value. So on the screen’s OnVisible property, we need to insert the below expression:
OnVisible = ClearCollect(ColColor,{ColorH:Char(160)});Collect(ColColor,Distinct(Vehicles,Color))

Where,

  1. ColColor: The name of the collection
  2. ColorH: The name of the collection header
  3. Vehicles: The name of the data source
  4. Color: The name of the SharePoint column
powerapps dropdown with blank value
powerapps dropdown with a blank value
  • Next, add a dropdown control to the screen and insert the collection name (i.e., ColColor) on the Items property.
PowerApps dropdown null value
PowerApps dropdown null value

Save and publish the app now. When you reopen the app, you will notice a blank value in the dropdown control.

Also Read: How to Remove Duplicates in Power Apps Dropdown

Power Apps dropdown remove the blank value

Here, we will see how to remove a blank value from a PowerApps dropdown control that contains a SharePoint column value.

Assume we’ve created a Power Apps dropdown control with a SharePoint column value containing a blank value, as shown below.

powerapps dropdown remove the blank value
powerapps dropdown remove the blank value
  • We can see that the above dropdown control contains a blank value, including some repetitive values.
  • To remove this blank value as well as the duplicate value, we need to insert the below expression into the dropdown’s Items property.
Items = Filter(Distinct(Vehicles,Color),Not(IsBlank(Result)))

In the above expression, we have used distinct() to remove the duplicates. Now we can see the blank value is removed from the dropdown control and it displays only the unique values like below:

Remove blank value from Power Apps dropdown using SharePoint list
Remove blank value from Power Apps dropdown using SharePoint list

This is how to remove blank values from the Power Apps dropdown that uses the SharePoint list.

Check out: How to Set Default Value in Power Apps Dropdown

Power Apps dropdown allows empty selection

In the Power Apps dropdown control, there is a property named ‘AllowEmptySelection‘ that allows the user If no item is selected, the control displays an empty selection. Users can also clear their selections by selecting the blank item.

  • Let’s create a dropdown control by adding some items such as:
Items = ["Public", "Private"]
PowerApps dropdown allows empty selection
PowerApps dropdown allows empty selection
  • We can find the property that is set to false by default while working with a dropdown control.
Allow an Empty Selection within Power Apps dropdown control
Allow an Empty Selection within Power Apps dropdown control
  • When we open the app, the dropdown displays the first item by default. This can be very weird at times. But we can add a blank selection to the Power Apps dropdown control.
  • That means when the user opens the app, it will display a blank selection instead of the first item. It will let the user select their choice from a dropdown list.
  • To do this, set the AllowEmptSelection property as true on the Power Apps dropdown control.
AllowEmptySelection = true
PowerApps dropdown allowemptyselection
PowerApps dropdown allowemptyselection
  • Let’s save, publish and close the app for now. When we reopen it again, we can see instead of the first item, it will display a blank value on the Power Apps dropdown control.
Allow Empty Selection on Power Apps dropdown
Allow Empty Selection on Power Apps dropdown

This is how to work with the ‘AllowEmptySelection’ property on the Power Apps dropdown.

Read: How to use Power Apps Gallery Dropdown

Power Apps dropdown reset to blank

Here, we will discuss how to reset to a blank value while we are working with the Power Apps dropdown. Suppose we have created a dropdown control using a SharePoint column value like the below:

powerapps dropdown reset to blank
powerapps dropdown reset to blank

NOTE:

To remove the duplicate values, we have used distinct().
  1. Example – 1:

Usually, when we are working with a dropdown control(ex- the above dropdown) by default it displays the first item.

When we open the app, instead of the first list item, the dropdown will be reset to blank. We will set the properties below on the Power Apps dropdown control to achieve this need.

Default = " "
AllowEmptySelection = true
Reset = true

After that, save and publish the app. Then, close it and re-open the app. We can see that the dropdown will reset to the blank value like below:

Reset The Drop Down on Screen in Power Apps
Reset The Drop Down on Screen in Power Apps

This is how to reset to blank in the Power Apps dropdown control.

2. Example – 2:

Similarly, instead of closing and reopening the app, we can insert the reset function within the screen’s OnVisible property. As a result, each time the dropdown is reset to the blank value.

OnVisible = Reset(StateDropdown)

Where StateDropdown is the name of the dropdown control. Make sure to set true on the AllowEmptySelection property of the dropdown control.

powerapps dropdown reset to blank value
powerapps dropdown reset to the blank value

Whenever we open that screen, we can see the dropdown is reset to the blank value like below.

Dropdown reset to blank in PowerApps
Dropdown reset to blank in PowerApps

Once we click on the chevron, we can see the list of dropdown items. This is how to do a dropdown reset to a blank value in PowerApps.

Also check out: Power Apps Gallery Group By [With Real Examples]

Power Apps dropdown default value null

Do you want to set null as the default value while working with the Power Apps dropdown control? If so, we recently published an article where we described how to achieve this requirement as well as how to work with the default value on the Power Apps dropdown with different scenarios.

To get the answer, click on the mentioned link, i.e., Power Apps dropdown default blank or null.

Power Apps dropdown empty concatenate values

  • Here, we will see how to work with powerapps dropdown empty concatenate values. That means we have prepared two dropdown lists and both are having some random values. One of them has an empty value like the below:
Items = ["Public", "Private", ""]                                              //For first dropdown including an empty value 

Items = ["Park", "Office", "Temple", "Personal automobiles"]   //For second dropdown
PowerApps dropdown empty concatenate values
PowerApps dropdown empty concatenate values
  • Now we’ll add a label control to display the concatenated values from both dropdown items.
  • In addition, we will add a condition to the label control. When we select the empty item, it will display a specific text with the other selected item by concatenating them, according to the condition.
  • Add a label to the screen and insert the below expression on the label’s Text property.
Text = Concatenate(If(IsBlank(ChoicewithemptyDropdown.Selected.Value),"Please select an item",ChoicewithemptyDropdown.Selected.Value)," - ",PlaceDropdown.Selected.Value)

Where ChoicewithemptyDropdown and PlaceDropdown are the names of the dropdown controls.

Concatenate empty values from multiple Power Apps dropdowns
Concatenate empty values from multiple Power Apps dropdowns
  • Now save and publish the app. Play it in preview mode or click on the F5 key. Let’s choose an item from the second dropdown as well as an empty item from the first dropdown. We can see the concatenated value will come as below:
powerapps dropdown concatenate empty values
powerapps dropdown concatenate empty values

This is how to work with PowerApps to concatenate empty values on dropdowns.

Read: Power Apps Gallery Patch [With Various Examples]

Power Apps if dropdown empty

In this section, we will see how to check an empty value in the Power Apps dropdown control. We are going to use the above dropdown control that has an empty value.

When the user selects the empty value, it will show the text as “Blank value“; otherwise, it will display the selected item from the dropdown control.

  • Add a label control to the screen and insert the below expression on the label’s text property.
Text = If(IsBlank(ChoicewithemptyDropdown.Selected.Value),"Blank Value",(ChoicewithemptyDropdown.Selected.Value))
PowerApps if dropdown empty
PowerApps if dropdown empty

Let’s play this app in preview mode. And select the blank value from the dropdown control. Now the result will come like below:

PowerApps if dropdown empty
PowerApps if dropdown empty

This is how to check if the PowerApps dropdown is empty.

Check out: Power Apps Gallery SharePoint [With 15+ Examples]

Power Apps dropdown empty filter

Here, we will see how to work with the Power Apps dropdown empty filter. That means there is a dropdown control having a blank value. When the user selects any value, the gallery will be filtered as per the selected item.

But, when the user selects the blank value, the gallery will display all the items. To work with this, the following steps are:

  • Let’s insert the below expression within the screen’s OnVisible property that will create a collection using a certain SharePoint choice column including a blank value.
OnVisible = ClearCollect(CollStatus,{Value:" "});Collect(CollStatus,Choices(vendors.Status))

Where,

  1. CollStatus: The name of the collection
  2. vendors: The name of the SharePoint list
  3. Status: The name of the SharePoint choice column
powerapps dropdown empty filter
powerapps dropdown empty filter
  • Next, we will add a dropdown control to the screen and insert the below expression on the dropdown’s Items property to display the choices including the blank value.
Items = CollStatus.Value
Show all items in a gallery if Power Apps dropdown is blank
Show all items in a gallery if the Power Apps dropdown is blank
  • Now, we will add a gallery to the screen and insert the below expression on the gallery’s items property to display the filtered items along with all items.
Items = If(StatusDropdown.Selected.Value = " ", vendors, Filter(vendors,Status.Value = StatusDropdown.Selected.Value))

Where StatusDropdown is the name of the dropdown control.

Filter and show all when Power Apps dropdown is empty
Filter and show all when the Power Apps dropdown is empty
  • Let’s save and publish the app. Play the app in preview mode. Then select the blank value from the dropdown value, and we can see it will display all the items within the gallery like below:
Show all items in a gallery if dropdown is blank on Power Apps
Show all items in a gallery if dropdown is blank on Power Apps

This is how to show all items in a gallery if dropdown is blank on Power Apps.

Also, you may like the below Power Apps Tutorials:

Conclusion

From this Power Apps tutorial, we have learned all about the usage of blank values within the Power Apps dropdown control, and also, we have discussed the below examples with different scenarios. such as:

  • How to create a blank value within the Power Apps dropdown?
  • How to remove the blank value from the Power Apps dropdown control?
  • How to work with Power Apps dropdown’s AllowEmptySelection property?
  • How to reset the Power Apps dropdown to a blank value?
  • How to set null as the default value within the Power Apps dropdown?
  • How to concatenate empty values within the PowerApps dropdown?
  • How to show if the selected item is a blank within the Power Apps dropdown control?
  • How to show all items in a gallery if the dropdown is blank on Power Apps?
>