2 Replies Latest reply on Feb 28, 2012 8:55 AM by MarcMcCall

    Flag duplicate email addresses



      Flag duplicate email addresses


      Is it possible to make a flag field to flag if there are duplicate email addresses that arent related Contacts through an ID_account.  I would like to set it up so that I have a field that would say "Duplicate Email in ID_Account". Im thinking I would have to run a script or something.  I dont want to set the field up as uniuqe data only, because this flag will tell me that I need to get with the customer so they can set up another email account so they can log into multiple account set up on an e-commerce site.  


      The tables are set up like this:  Account table ID_Account.  Contact table id_account.  I know there are duplicate contacts under multiple accounts, this would enable me to lacate them through this flag and know which account to look under so I can assess how to resolve it.

        • 1. Re: Flag duplicate email addresses

          Set up this self join relationship on contacts:

          Contact::id_account ≠ DupEmailsContact::id_account AND
          Contact::Email = DupEmailsContact::Email

          DupEmailsContact is a second occurrence of Contact.

          If you have only one contact record for each account the first pair of fields are not needed. It's used to omit contact records from the same account.

          Then this calculation: Not IsEmpty ( DupEmailsContact::id_account ) will be true if you have a duplicate email for a contact record from a different account.

          You can use this with a conditional format to make layout text "Duplicate Email in ID_Account" visible on your layout or you can put it in a calculation field like this:

          If ( Not IsEmpty ( DupEmailsContact::id_account ) ; "Duplicate Email in ID_Account" )

          If id_account is of type number you can simplify it to:

          If ( DupEmailsContact::id_account ; "Duplicate Email in ID_Account" )

          • 2. Re: Flag duplicate email addresses

             Works like a charm.....


            Thanx again PhilMod...