How do you handle the default of a drop down when you want it to always be blank when opening? I have played with the default value and it always loads the first item no matter what I do. The Items are coming up from an on-premise SQL database. Example: I have 4 drop downs for staff members that maybe on a truck, only the first one will be required and I want the app user to start with all blanks and fill in as needed
Solved! Go to Solution.
@svenvu wrote:
Now my gallery form is almost perfect but I can't change the combobox (with single select and search) to a dropdown because it contains a list of thousands of employee names (from the Office365-connector). Is there any chance this property could be made available for comboboxes?
The combobox has, since it was introduced, supported empty selection, so there's no need to set any property for that.
Hi Carlos
Thank you for looking into this!
I have documented the specific usecase in this topic that is now removed from the spamfolder:
And I found the solution in your blogpost:
https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/
In the DefaultSelectedItems property from the combobox I had to enrich the formula with: If(EditForm1.Mode=FormMode.Edit;....;Blank()). I would not have guessed that myself. You're always welcome to screen the topic and give advise for best practices 🙂
Big thanks!
There's a problem with this feature, once you select a value, you cannot select the blank value again. It's removed from the list.
The old Advanced Property in DropDown DataCardValues named "AllowUnsetValue" has been renamed to "AllowEmptySelection"
On Dropdown-DataCardValues you can set this "AllowEmptySelection" property to value "true" and the Default-Property to "" then you will have a blank default value in the Dropdowns. For all FormModes, of course
It makes sense to set this Default-Blank only to FormMode.New otherwise each edit will update with blanks:
Not available for Combo Boxes
I am struggling with this as well. I am using a dropdown control, and if I *change* either the Default or Reset, then I am presented with a drop down with nothing selected. But once I select something, and stop and restart the App, the previous selection persists. I think I need to start with the empty control, because I'm loading a gallery once the dropdown item is selected. I don't want to load the gallery with the previously selected item.
Hi all
Just a quick sidenote. The property is called AllowEmptySelection and not AllowUnsetSelection.
But after posting this I saw that someone already mentioned this. Dope 😉
Dawid van Heerden
Follow on Twitter: @DavesTechTips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please give it a thumbs up and Accept as Solution to close the topic and make it easier to find for other people with similar questions.
Dear Carlos,
your example works fine in case the table Employees has ONLY a Name column.
A generally correct formula would be:
ClearCollect(employeesWithBlank,{Name:Char(160)}); Collect(employeesWithBlank,ShowColumns(Employees, "Name"))
It took me some time to figure that one out 😃
Ciao,
reinvdo
Dear Carlos,
the solution you propose has a strange side-effect in my app: the drop-down box will NOT select the default value automatically maybe because employeesWithBlank is a collection and not a Table. When I use the Table the drop-down selects the Parent.Default value correctly. In case of the collection it selects the 'empty' value.
Any hints to correct this?
Thanx fro your support.
Ciao,
reinvdo
CarlosFigueira - Thank you for your answer. I was struggling to have blank selection in drop down inside powerapps.
Earlier it was 'AllowUnsetValue' property which empowered to have blank selection in drop down.
In July 2021, seems 'AllowUnsetValue' is no longer in use (or have been renamed) and now 'AllowEmptySelection' when equals to true, provide blank selection in drop down.
Hello,
I was looking for a similar solution and found out this is pretty simple to solve.
Just put Zero in Properties > default and put True in 'Allow empty selection' , your drop down will show an empty value as default.
I hope this works for you also.
User | Count |
---|---|
261 | |
128 | |
99 | |
48 | |
47 |