web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to search for a re...
Power Apps
Unanswered

How to search for a record in a table and put a conditional if it exists

(0) ShareShare
ReportReport
Posted on by 2

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

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard