Hello. I'm using Apex 4.2 and Oracle 11.g.
I have an app tracking names and eMail addresses of members. I created an Edit screen using the Form On A Table With Report. It's working fine. A simplified version of the table is below:
I also created a validation to prevent a user from creating a new row where the value in email_address already exists.
Type: Not Exists
Validation Expression 1: Select 1 from MAIL_RECIPIENT where email_address = :P38_email_address;
Associated Item: P38_EMAIL_ADDRESS
When Button Pressed: CREATE
I'd like to do something similar for a SAVE. For example, if someone were to make a data entry error and update the existing Joan Smith-Jones member and attempt to change the eMail address to "jjones@domain.com", I'd like a validation to provide a warning and prevent the update. I tried to look through the validation types to see if a validation could be fired only when a particular page item (e.g. P38_email_address) was changed, but I couldn't figure out how to do that. The best validation message would say something like "That email Address is already associated with Jeff Jones. Please maintain only one email address per member." But I don't know how to select the first_name and last_name values in a "Not Exists" validation.
Of course, if someone were to attempt to update the First name of John Doe to Jeff, that would be fine.
Thanks for looking at this.