cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
keshamer
Level: Powered On

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

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, '')

keshamer
Level: Powered On

Re: can't update value from null SQL

@RandyHayes , thank you so much!

keshamer
Level: Powered On

Re: can't update value from null SQL

@DavidJennaway Thank you for your help

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 94 members 1,798 guests
Please welcome our newest community members: