LookUp after Patch (creating a new record) returns incomplete record for SQL
After calling a Stored Procedure (via PowerAutomate) to create a new record in an Azure SQL, I check that the return is successful and if so, I call LookUp() to retrieve the newly created record.
This all works fine except that the record returned by LookUp() doesn't return all the columns in the row. It returns a record, but only with 4 columns, not the 9 it should have. Paraphrasing, I do something like this:
Set( tmpNewRecordID , SPU_CreateRecord.Run( A, B, C));
The record returned by the LookUp() only has 4 columns (A,B,F,G) but it should have 9. The other 5 coluns are populated by the stored procedure. I even inserted a Refresh(Records) statement between the Stored Proc run and the LookUp() statement and this resulted in 5 columns being returned, but not the full 9. Note that the same LookUp() works properly once we navigate away from this screen and run the LookUp() again on another screen.
Strangely, for one of the missing columns, the PowerApps Studio variable inspector reports a blank value, even though a text label is reporting its value correctly. For another missing column, a text label reports blank as does the Studio.
Is this a timing issue? Or a bug with the Flow/SQL connectors...
EDIT: After a lot of research on other sites, I can confirm this is a bug with PowerApps/SQL Connector interaction. It was reported at least as early as 2018 by @Meneghino on his blog. It's particularly evident when there is a column of type "Date" in the SQL table. Please fix it Microsoft.