Hello Everyone,
I've never met this kind of issue before and I don't know how to solve it.
Purpose of my code is to update List data row into a specific column based on information into a collection.
The code which should works for is this operation would be this one :
ForAll(
MyCollection,
Patch(
'MyList1',
LookUp('MyList1', ID = ThisRecord.ID),
{
Quantity: LookUp('MyList1', ID = ThisRecord.ID, Quantity) - ThisRecord.Quantity
}
)
)
For an unknown reason, ID = ThisRecord.ID is not recognized and give an error code like "Error when trying to retrieve data from server"
So I changed = by In function.
No error but the update is made into all my list and quantity doesn't match
I tried to use UpdateIf like below
ForAll(
MyCollection,
UpdateIf('MyList1', ID in MyCollection.ID,
{
Quantity: LookUp('MyList1, ID in ThisRecord.ID, Quantity) - ThisRecord.Quantity
}
)
)
The IDs in my collection are updated in my list, but the system updates the quantity column with a number that makes no sense. I tried using the equals sign (=) and the "in" function, but the results did not improve.
I don't understand why my initial code (First into this topic) doesn't work with the equals sign (=). To me, it seems like the best way to update my list. Has anyone encountered this situation before and can offer help to correct my code?
Thanks in advance for your assistance.