Hello,
I have a strange problem with PowerApps connected to an Azure SQL database.
I can read the database perfectly, I can do LookUp etc.
In example, Lookup('[dbo].[products]',partNum=3,partName) returns the product name stored for product number 3.
I also put on the screen a gallery for that table, it shows up my products.
Then I tried to update that same record through a button, with OnSelect, to change the product 3 into a product 9.
Patch('[dbo].[products]',LookUp('[dbo].[products]',partNum=3),{partNum:9})
I run the App in the PowerApp studio, some sliding dots appear on top of the screen when I click th button then stop, but the record does not change in the Gallery, product 3 does not convert into Product 9.
A record for product 3 exists as a field with Lookup('[dbo].[products]',partNum=3,partName) displays the product name.
I then activated the Azure SQL Logs to see the activity on Azure, and then I have the surprise to see absolutely no activity, no SQL query coming from PowerApps.
The user account used by PowerApp for that test is admin on the Azure database and when I check the rights with DataSourceInfo('[dbo].[products]',DataSourceInfo.EditPermission) the result is "true".
To verify if the connection is OK I append Refresh('[dbo].[products]') to my button command and yes, I see 8 lines of SQL logs showing up. I then edit again my OnSelect command to just have Refresh('[dbo].[products]') then erase the SQL log.
I run the app and the Azure SQL log contains the same exact 8 lines.
Conclusion: the Patch() command does not make any call to the Azure SQL Server!
I tried with other PowerApps commands that create or patch records, I have the exact same behavior.
Would anybody have an idea on what happens? Thank you!
John