Greetings! I have a PowerApps Canvas App that I am bolting onto a Power BI Dashboard. The goal of this app is to do a mass update of two fields in a MySQL table based on two dropdown values (ddNewStatus_1.Selected.id and ddNewUse_1.SelectedID). My Canvas App as a Gallery1 with these fields: Egg_ID (the ID), Use, Status, and Description. The MySQL table (mysql.mytable) has many fields in it. It has a primary key of ID and contains two columns called Status and Use (along with quite a few more columns). The use case is that a user filters the data set in Power BI and it in turn passes the selected mysql.mytable.ID (along with Status, Use and Description) values to my Canvas App that get deposited into Gallery1. The user can choose each dropdown value and hit submit (no record selection as all records brought into the Gallery1 will be updated).
Here is my OnSelect logic. It's getting hung-up on the Lookup on my patch: "Issue - Incompatible types for comparison. These types can't be compared: Number, Control".
OnSelect:
ClearCollect(
UpdateCol,
ForAll(
Gallery1.AllItems,
{
EID: ThisRecord.Egg_ID
}
)
);
ForAll (UpdateCol,
Patch (
'mysql.mytable',
LookUp('mysql.mytable',ID=EID),
{
Status: ddNewStatus_1.Selected.ID,
Use: ddNewUse_1.Selected.ID
} )
);