Search for a specific entry in a data type?

I have an app where registered users can email people by typing in their name, email address, etc and clicking a “Send Email” button.

When the “Send Email” button is clicked, a new “Recipient” entry is created (in a “Recipient” data type) and the Recipient’s information is stored in the database. The Recipient’s info is then stored in a repeating group so the user can see a full list of every Recipient who has been emailed.

I want to add a constraint to the “Send Email” button that does a search of all Recipients to see if the Recipient’s email is found in the database. If the Recipient’s email has been found in the database, that will mean they have been emailed before, and the app will display an error message (essentially ensuring that a Recipient can only be emailed once).

Does anybody know how to do this? I’m struggling with the syntax of how to do this search…

Thanks in advance!

@crawford.ifland You can use ‘Search for Recipients:count is 0’ with constraint on the email field to make button clickable or greater than some number to give an error message

1 Like

Awesome, thank you so much!

This topic was automatically closed after 70 days. New replies are no longer allowed.