Hello, good afternoon. I hope you are doing well.
I have a problem and I would like to know if you can help me.
I have a gallery where I inserted a text box to write the units of each product entered.
However, when I do the Patch, it takes the last selected number for all products.
For example, if the first product has 2 units purchased and the second product has 5 units purchased, during registration, both the first and second products are registered as if they had purchased 5 units each.
Here is the code:
ClearCollect(colSalMultiCod,{Códigos:ForAll(Split('Txt.Sal.MultiCod'.Text,Char(10)), {Result: ThisRecord.Value})});
ClearCollect(colSalMultiCod2,Ungroup(colSalMultiCod,"Códigos"));
ForAll(colSalMultiCod2,Patch(
Tabla_Salidas,
Defaults(Tabla_Salidas),
{
Código:colSalMultiCod2[@Result],
Cantidad:Value('Pdct.Cantidad'.Text)
}
));

Thank you in advance. Best regards.