How to find and remove duplicate records in my Form

How to find and remove duplicate records in my Form

It is possible to find the duplicate entries in the database and delete them. Below is the example of removing duplicate email entries in your database. You can replace the Email field with the field name that you want to find for duplicate entries.

Create a new function. The function's script can be of the below kind.
  1. // create two lists. one for the duplicates and the other for the original.
    myList = list();
    duplicateRecordIDList = list();
  2. // fetch all the records in the form
    for each record in myForm [ID != 0]
    {
  3. // check if there exists a duplicate value, if yes, add the record ID to the duplicateRecordIDList list.
    if ( myList.contains (record.Email) )
    {
    duplicateRecordIDList.add(record.ID);
    }
  4. // if there is not a duplicate entry add it to myList List
    else 
    {
    myList.add(record.Email);
    }
    }
  5. // If you want to delete the duplicate entries,
    delete from myForm [ID in duplicateRecordIDList ];
 
Refer the below links for help.
  1. http://help.creator.zoho.com/Functions.html
  2. http://help.creator.zoho.com/for-each-record-in-form.html
  3. http://help.creator.zoho.com/Built-in-Functions.html#List_Functions
  4. http://help.creator.zoho.com/Delete-Records.html
If you want to avoid duplicate entries in future, you can make the particular field value as unique . You can also referhttp://lounge.creator.zoho.com/tips-and-tricks/zoho-creator-show-unique-values-in-picklist-referencing-data-from-another-form , if you are playing with a list field.
    • Related Articles

    • Checking Duplicate Records in Zoho CRM

      When you have hundreds and thousands of records in your CRM, as your business grows, it becomes a very difficult task to check for duplicates. Zoho CRM helps you arrest duplicates even before they can be created, with the help of what we call "unique ...
    • Checking Duplicate Records in Zoho Recruit

      When you have hundreds and thousands of records in your Recruit, as your business grows, it becomes a very difficult task to check for duplicates. Zoho Recruit provides you with an option to check if a record already exists in your Recruit account by ...
    • Merging Duplicate Records

      When you work with a significant volume of data, it gets quite challenging to keep your database free from duplicates. As the avenues to create records in CRM increase, the chances of duplicate entries increase as well. For example, the same lead may ...
    • Merging Duplicate Records

      Introduction Over a period, there may be a chance of accumulating duplicate records. You can search the duplicates and merge them for a better organization of records. There are two features to merge duplicate records. Find & Merge Duplicate Records ...
    • Merge Duplicate Records

      Over a period, there may be a chance of accumulating duplicate records. You can search the duplicates and merge them for a better organization of records. There are two features to merge duplicate records. Find & Merge Duplicate Records  De-duplicate ...