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:
- powerapps dropdown with blank
- powerapps dropdown remove the blank value
- powerapps dropdown null value
- powerapps dropdown add empty value
- powerapps dropdown allows empty selection
- powerapps dropdown add blank default
- 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:
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,
- ColColor: The name of the collection
- ColorH: The name of the collection header
- Vehicles: The name of the data source
- Color: The name of the SharePoint column
- Next, add a dropdown control to the screen and insert the collection name (i.e., ColColor) on the Items property.
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.
- 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:
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"]
- We can find the property that is set to false by default while working with a 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
- 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.
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:
NOTE:
To remove the duplicate values, we have used distinct().
- 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:
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.
Whenever we open that screen, we can see the dropdown is reset to the blank value like below.
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
- 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.
- 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:
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))
Let’s play this app in preview mode. And select the blank value from the dropdown control. Now the result will come like below:
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,
- CollStatus: The name of the collection
- vendors: The name of the SharePoint list
- Status: The name of the SharePoint choice column
- 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
- 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.
- 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:
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:
- How to use Power Apps Combo Box Control?
- How to Reset Power Apps Combo Box
- Power Apps Cascading Dropdown Control
- Power Apps Gallery Filter [With Real Examples]
- Power Apps Gallery Control [Complete Tutorial]
- Power Apps Data Table [Complete Guide]
- Power Apps Radio Button
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?
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.