We have 2 SQL connections, one to fabric and other to normal SQL. I am trying to Patch to either, but they both don't work and both just say "Invalid Arguments" without specifying why, the error is different to one that has an invalid argument.
I have tried many variations and am using a Stored Procedure on the SQL as a backup, but this is extremely frustrating.
I rebuilt the connection and added it to a new blank canvas, same issues are occuring.
Monitor does not work as Power Apps is identifying an error and won't run the formula.
I believe there may be something wrong with my environment, as it is happening on both SQL servers with different tables.
Is there any sort of troubleshooting I can do to actually find WHY its failing?
ID is the only required collumn...
Here is every variation I have tried...
UpdateContext({varGUID: GUID(),varRecord:First(PIW_K10)});
// Blank record with only ID (UID column type)
Patch(PIW_K10,
Defaults(PIW_K10),
{
ID: varGUID
}
);
// Replacing a record with itself, record has to be valid as its stored.
Patch(
PIW_K10,
varRecord,
varRecord
);
// Avoiding ID.
Patch(
'PIW_K10',
First('PIW_K10'),
{
Modified_On:Now()
}
);
// Correctly Errors as ID is UID not int
Patch(
'PIW_K10',
Defaults('PIW_K10'),
{
ID: 123
}
);
// Stored Proc works fine.
'PIW_WH%20'.dboManagePIWK10(
{
OperationType: "INSERT",
ID: varGUID
}
);