Duplicate Email address warnings

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
D Campbell
Posts: 20
Joined: 2017-03-12 09:32

Duplicate Email address warnings

Post by D Campbell » 2017-10-27 15:38

Wanted to see if you guys know a way to do this scrip or code? I m looking for something that user can click on a button to look for duplicate email addresses on entire table and if do, then it should show a pop up window saying that "two or more email addresses have been detected!" then show the list of file numbers that have duplicate email addresses?

Does it make any sense at all?
Dave

Abeer
Posts: 18
Joined: 2017-03-12 09:19

Re: Duplicate Email address warnings

Post by Abeer » 2017-11-13 06:22

you can append a button to the table view page, when clicking it, it sends an ajax request that queries your database to find duplicate email records and return each email and its repetition.

this query can do the job:

Code: Select all

SELECT email, COUNT(*) c FROM tableName GROUP BY email HAVING c > 1;
it will return a result with the email value in the first column, and a count of how many times that value appears in the second.

Post Reply