Hello everyone.
I would appriciate if anyone could help me, I need to include a rule in a removing record.
I have 3 tables related on dataverse: one for clients, another for ComercialEmails, and another for Emails. This app retrieve emails from a lot of inboxes using power automate desktop, so I need to include a button to remove this client if he's not retrieving emails anymore or another reason, but there is a rule for that: it can't be removed if there is emails retrieved already. So the table client register the clients data, the comercialEmails register the clients emails that will be retrieved and the emails retrieved will be registered in emails table. So I have to search in emails table if there is any email with the same "To" field in emails as the "comercialEmail" column in comercialemails. And if there is the client can't be removed. Otherwise the client can be removed. And the client can have a lot of ComercialEmails registered, so I have to check in all comercialEmails. I tried with forall and ifs, but it's not working. I already did it in the EmailsComercial table and it's working, not I have to do it in the client table and it seems to be a bit more complex.
The code I did for ComercialEmails is this: If(LookUp(emails;to= GalleryEmailsComerciais.Selected.emailComercial).para = GalleryEmailsComerciais.Selected.emailComercial;Notify("This email can't be removed");Set(varGrupoRemoveEmailComercial;true))
It's in portuguese so the comas is switched by ";"
I really appriciate everyone's attention.
Eduardo Silva

Report
All responses (
Answers (