cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SatxThree
Frequent Visitor

Inserting Null/Blank value into ComboBox controls to Update SharePoint list

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.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SatxThree
Frequent Visitor

OK. So the fix is to enable "Formula-level Error Management."

 

Go to "Settings" > "Upcoming features" > "Experimental" > Toggle on "Formula-level Error Management"

 

View solution in original post

5 REPLIES 5
SatxThree
Frequent Visitor

OK. So the fix is to enable "Formula-level Error Management."

 

Go to "Settings" > "Upcoming features" > "Experimental" > Toggle on "Formula-level Error Management"

 

View solution in original post

indhaa
Impactful Individual
Impactful Individual
SatxThree
Frequent Visitor

Hi indhaa,

 

Many thanks for the reply, but I found the solution.

JR-BejeweledOne
Super User
Super User

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
)

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,909)