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

Patching null to SQL

I'm aware that turning on the experimental setting "formula-level error management" allows you to write nulls to SQL, but it breaks my entire app - the app quits working altogether with the setting turned on. Are there any workarounds?

-editing - on further testing, this isn't actually my issue at all. Can't figure out how to delete so please disregard, thanks

5 REPLIES 5
Helper II
Helper II

What are you trying to achieve? because if you just want a empty field in your sql database you dont have to put anything in there. for instance. I have a database with 2 columns. name and age. i use a patch like this

Patch('[dbo].[Person]'; Defaults('[dbo].[Person]'); {name: "Danny"})
In this case the column name would have Danny and the age column would say "Null". Plus i dont have any setting turned on that allows me to do this

I think he's referring to updating a field to NULL where it already has a value.

 

I've come across the same issue with SharePoint and date fields.

@AParker 
I just tested something. i have 2 text input called "txtName" and "txtAge".

and a button with a patch function in it

Patch(table1; Defaults(table1); {name: txtName.Text; age: txtAge.Text});;

And then i have another text input called "txtName2" and a button with a patch function 

Patch(table1; Last(table1); {name: txtName2.Text; age: Blank()});;

What this does is update the name in the last row you added and update the age to a blank field. Hope this helps

Helper II
Helper II

LOL, i accidently skipped over the -editing- part

Haha - yeh, me toooooo!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,397)