I have tried to update all gallery records into dataverse table based on ID match but its update only last records of gallery into first matched row of table.
Code is -
ForAll(NewGal.AllItems,
Patch(ProjCost,
LookUp(ProjCost, ProjCostID=PCIDlbl.Text),
{
Currency:Input1.Text,
Expenses:Input2.Text
} ) );
Note : PCIDlbl is label outside gallery which contain ID value which we need to match with table column ProjCostID to update records.
I have ProjCost table which contains ProjCostID,Name,Currency ,expences and others columns , so suppose ProjCost table has following records
ProjCostID Name Currency Expenses......
1 Name1
1 Name2
1 Name3
Other column values we need to update by Gallery(Name : NewGal) records based on lookup ProjCostID with label id value.
Above code only update last record of gallery into first row of table i.e. Its update only corresponding to 1 , Name 1
Kindly suggest how can i update gallery records for all table row like in above table values should be updated for (1,Name1 ),(1,Name2 ) and (1,Name3) ?
Kindly let me know if any input required!!