Power Apps newbie here. Hoping I can find some help.
I have a form, "SurveyForm" with multiple ComboBox controls.
The form is connected to a SharePoint list data source. The SharePoint columns are Choice columns.
Using the Patch function, I am able to insert ComboBox values into the SharePoint list fields.
My problem is when I need blank or null value to be inserted into the SharePoint list fields.
For instance, I select a value of "5" in the ComboBox form control.
I click the "Submit" button and the associated SharePoint list field is updated with the selected value "5". That's good! Very proud of me.
But, if I go back to the ComboBox and delete the "5," leaving the selection blank, the SharePoint list field still holds the original value "5" after I click the "Submit" button.
I need the field in SharePoint to be blank.
If I could get some insight or be pointed in the right direction to figure this out, I would be extremely grateful.
Hi JR-BejeweledOne,
I was hoping for a solution that didn't require adjusting individual columns because there are quite a few. (70+)
I think toggling "Formula-level Error Management" in the settings did the trick in my situation.
But actually, I did learn something from your reply. One of the solutions I tried was similar to your suggestion:
If ( IsBlank(ComboBoxY.SelectedItems)
But I left out this part and it wasn't working:
Blank()
Now I know for future reference.
Many thanks for taking the time to reply. I greatly appreciate it.
You will need to do an if or switch when you patch that value. In your patch statement you can do something like this. For each column in your list that needs to have a blank value if the combobox is blank, set the patch for that specific column like this.
Patch(DataSource, xxxxx,
{
ColumnName:
If ( IsBlank(ComboBoxX.SelectedItems), Blank(),
ComboBoxX.Selected.Value
Column2Name:
If ( IsBlank(ComboBoxY.SelectedItems), Blank(),
ComboBoxY.Selected.Value
)
Hi indhaa,
Many thanks for the reply, but I found the solution.
Hi,
Pls refer to this article https://powerusers.microsoft.com/t5/Building-Power-Apps/Update-sharepoint-field-with-empty-string/td-p/495117
OK. So the fix is to enable "Formula-level Error Management."
Go to "Settings" > "Upcoming features" > "Experimental" > Toggle on "Formula-level Error Management"
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional