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 III
Super User III

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 III
Super User III

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
Solution Supplier
Solution Supplier

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,986)