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

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 51 members 3,461 guests
Please welcome our newest community members: