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

Potential bug in Updateif with SQL Tables

Hi Team,

 

I recently came across an interesting problem where the UpdateIf function wasnt doing anything when applied to a Azure SQL Table.
Assume you have a table in Azure SQL with columns, A, B and C. 
To update value of column C  to 10 in all rows of the table where A =1 and B=2, you would write the following command:
Updateif('dbo.MYSQLTable',A=1 && B=2, {C:10})
Interestingly this usually doesnt work and data which meets the conditions is not affected in SQL, This is possibly a bug. When the statement executes, it doesnt even feel like if powerApps actually queried the data source(takes no time to execute).

I was able to get it working by calling an innecessary ClearCollect just before this line, the following chunk of code perfectly worked for me:

ClearCollect(TempCollection, Filter( 'dbo.MYSQLTable', A=1 && B=2 ));
Updateif('dbo.MYSQLTable',A=1 && B=2, {C:10})

Can someone from MS Team look into if this is a bug with updateIf command.

Thanks & Regards,
Nouman

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 45 members 4,126 guests
Please welcome our newest community members: