cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VictorSotnikov
Helper II
Helper II

Cannot put a NULL value into an SQL DB column using Patch()

I have a canvas Power App that is connected to a SQL Server table MyDB with a column MyColumn:

            MyColumn [nvarchar](255) NULL

 

In the App I have the following code in OnChange property of a Dropdown control:

 

          Patch('MyTable',ThisItem,{MyColumn:Blank())

 

This does not work – the MyColumn does not acquire NULL after the code is executed.

 

How can I fix it?

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you @v-jefferni , I think I might understand the reason better now based on that link you provided.

 

Did it help you @VictorSotnikov to understand the reason ?

View solution in original post

5 REPLIES 5

@VictorSotnikov 

 

Can you check if turning on the formula-level error management setting helps with this?

 

1. Click Settings

2. Click Upcoming Features

3. Toggle the Formula-level error management setting to On

Then just close the modal, see if it works.

 

poweractivate_0-1664838760107.png

 

See if it helps @VictorSotnikov 

Yes - it has helped.

Do you know the answer - why this has helped?

@VictorSotnikov 

 

No, I do not know why this has helped. 

 

I suspect it is some internal reason.

I really don't know the reason though.

@v-jefferni @v-xiaochen-msft @v-bofeng-msft do either of you know the reason? I do not know the reason.

v-jefferni
Community Support
Community Support

Hi,

 

Please refer to the blog:

New Experimental Feature: Error Handling and Writing Null values to databases | Microsoft Power Apps

 

Best regards,

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Thank you @v-jefferni , I think I might understand the reason better now based on that link you provided.

 

Did it help you @VictorSotnikov to understand the reason ?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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