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!