//OnAddFile Set(varIMG;Last(Self.Attachments));; Set(Img_Json;JSON(IMG_IMAGE.Image;JSONFormat.IncludeBinaryData));; Set(Img_Json;Substitute(Img_Json;"""";""));; Collect( Col_Anexos; { FileName:varIMG.Name; File:Img_Json; Nome: Last(Self.Attachments).Name; Valor:Last(Self.Attachments).Value } ) //OnRemoveFile ForAll( Col_Anexos; With( { NomeArquivo: LookUp(Anexos.Attachments;Name = Nome;Name) }; If( IsBlank(NomeArquivo); Collect( Col_Excluir; { NomeArquivoExcluir:Nome } ) ) ) );; ForAll( Col_Excluir; RemoveIf(Col_Anexos;Nome = NomeArquivoExcluir) );; // Gera variável com Json para modelo do Power Automate Set(VarJson;JSON(Col_Anexos)) //OnSelect do botão salvar dados If( !IsEmpty(Col_Anexos); UpdateContext({loc_retornoAutomate:Anexa_Arquivos_Do_Chamado.Run(JSON(Col_Anexos);loc_PatchChamados.ID_Chamado).resposta}) );; If( !IsEmpty(Col_Anexos) And IsBlank(loc_retornoAutomate); Remove(Lista_Chamados;loc_PatchChamados);; Remove(log_chamados;loc_PatchLog);; Notify("Ocorreu um erro ao salvar os arquivos, tente novamente ou contate o administrador";NotificationType.Error) );; //Reset os anexos e limpa a galeria Clear(Col_Anexos);; Reset(Anexos);;