cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

@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.
Check out my PowerApps Videos too!

View solution in original post

4 REPLIES 4
Super User III
Super User III

@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.
Check out my PowerApps Videos too!

View solution in original post

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

@RandyHayes , thank you so much!

@DavidJennaway Thank you for your help

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (47,547)