I have a PowerApp which has some drop downs for optional fields to populate a SharePoint list. These fields are lookup fields from other SharePoint lists.
When creating or editing a record, the drop down shows blank by default which is fine and I can save it as blank which is expected. However, if I click on any other value from the drop down and then clear the value and save (submit), that sets the field value to the first item in the drop down.
The only workaround I found was to edit the item in SharePoint but that is not a scalable solution.
As far as I know it is currently not possible to patch a null value to a data source, in fact it is not possible to set a context variable to null. This is an issue, please add your kudos to this idea:
@Meneghino, That does not explain this completely. Basically, if that is the case, how can the inconsistancy while creating a new item be explained, between leaving the drop down untouched (then blank is set in SharePoint) vs. when value is selected and then cleared (then first element value is set in SharePoint) ?
Maybe there is one more thing going on in addition to what you are stating and that may lead to a solution that Power Apps team can implement for this issue.
Hi again @Chamara
In my experience the dropdown in PowerApps cannot be set to blank, it always shows one element of the Items table. If the Default property of the dropdoen does not identify an item then the default item will be the first record of Items.
The only exception is if the Items property of the dropdown is empty.
What can happen is that the dropdown appears to be blank, but in actual fact it is because the record which is selected has a blank value for the field being displayed in the dropdown. You can select which field is displayed in the Advanced properties of the dropdown, and unfortunately this selection is reset every time you change the Items property.
I hope this helps. Please let me know if anything is not clear, or if you have a different experience.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights