Hi @Anonymous ,
Apart from missing a closing bracket the code below should
- Action all items where in the gallery Descarte_Gallery_2, Checkbox_1 is checked AND for these
- Examine your table '[dbo].[E_DESCARTES]' AND
IF COD_FILIAL_PRODUTO = COD_FILIAL_PRODUTO1 AND
DATA_EMISSAO = DATA_EMISSAO1,
UPDATE the field in your table GERENCIA to the Text "APROVADOos"
ForAll(
RenameColumns(
Filter(
Descarte_Gallery_2.AllItems;
Checkbox1.Value = true
);
"COD_FILIAL_PRODUTO"; "COD_FILIAL_PRODUTO1";
"DATA_EMISSAO";"DATA_EMISSAO1";
"TOTAL_DESCARTADA";"TOTAL_DESCARTADA1";
"DESC_FILIAL_REDUZ";"DESC_FILIAL_REDUZ1"
);
UpdateIf(
'[dbo].[E_DESCARTES]';
COD_FILIAL_PRODUTO = COD_FILIAL_PRODUTO1 &&
DATA_EMISSAO = DATA_EMISSAO1;
{GERENCIA: "APROVADOos"}
)
)
You also do not need the rename columns as you do not use them
"TOTAL_DESCARTADA";"TOTAL_DESCARTADA1";
"DESC_FILIAL_REDUZ";"DESC_FILIAL_REDUZ1"
Apart from this, your code is valid and I regularly use the same syntax, so please first look at the filters and see if the issue is there with your data.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.