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"

 

indhaa
Super User
Super User

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,947)