I have a persons register in Creator. Now because the database has been populated from different sources, it is possible the same person could be in the db twice. Even with different data.
Therefore I want a function that can check for duplicates based on just one (or two) fields.
I think what might work is check the DOB. If there are two records with the same DOB, it could be the same person. Not necessarily, but possibly.
So if I could have a function that checks all records and outputs a list with any records of which there are two or more with the same DOB, and also shows first name and last name fields, then my administrator can manually check if there are duplicates. (btw definitely want a manual check, the function does not have to be fully automatic and should not delete any records)
Either a report that brings up the above list (preferred). Or a function that I can add to a report with a button.
I used to have a function that comes close. Looked like this, start with an empty list, check each record if the DOB value already appears in that list, if not add it, if it does then add it to a 'duplicate-list'. :
void CheckDoubles(Register record)
{
myList = List:String();
duplicateRecordIDList = List:String();
for each record in Register[ID != 0]
{
if(myList.contains(record.DOB))
{
duplicateRecordIDList.add(record.ID);
}
else
{
myList.add(record.DOB);
}
}
info myList;
}
But doesn't work on execution, not sure how or where this was implemented.
Maybe there is an easier way. Maybe using the count function, like
if(count(Register[DOB) > 1)
{
Ultimately add it to a report that can be opened any time, group together based on DOB
}
Any tips highly appreciated