cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

can't update value from null SQL

Hi everybody, 

I have a huge issue with powerapps with azure SQL. I think I never had it

In my database I have a lot of columns with a "NULL" Value and I patch it when it is needed.

Recently if import a table in a local collection I can't change any value if it was 'Null'.

I spend days on it and I just realised that if I change Null to "" in MSSMS it works.

 

Is it a recent bug and just have I to wait until it is solved ?

How can I avoid this bug in powerapps?

I'm to bad with MSSMS so can anybody tell me how to make a column Null-able with a default blank value?

 

Thank you in advance for your answers

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: can't update value from null SQL

@keshamer 

This has been an issue for quite some time with Patch and null values.  Use the UpdateIf function instead.

Take a look at this post for some more information.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: can't update value from null SQL

@keshamer 

This has been an issue for quite some time with Patch and null values.  Use the UpdateIf function instead.

Take a look at this post for some more information.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Highlighted
Responsive Resident
Responsive Resident

Re: can't update value from null SQL

In MSSMS, if you open the table designer and select the column, you can set the Default to an empty string in the column properties. Note that SQL Server uses single quotes ('), not double quotes, so you should enter 2 single quotes ('').

 

The default will apply to any new records created after you make the change. You can modfiy existing records with a simple SQL query:

 

update tablename
set columnname = ''
where columnname is null

 

Or if you have many columns to change, it is quicker to do the following:


update tablename
set columnname1 = isnull(columnname1, '')
, columnname2 = isnull(columnname2, '')
, columnname3 = isnull(columnname3, '')

Highlighted
Advocate III
Advocate III

Re: can't update value from null SQL

@RandyHayes , thank you so much!

Highlighted
Advocate III
Advocate III

Re: can't update value from null SQL

@DavidJennaway Thank you for your help

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,226)