Solved

Identifying duplicate entries in a list

Posted on 2004-09-03
5
248 Views
Last Modified: 2013-12-18
I have a field on a form which is a list of names, and need to check to see if there are any duplicates. I want to do this using a separate calculated field which will list any entries that appear more than once in the source field.

How do I do this using a formula. My best guess is to use the @Unique function and then compare this to the original list, but I'm not if this is possible.

Help would be appreciated!

0
Comment
Question by:mrt1
5 Comments
 
LVL 15

Expert Comment

by:Bozzie4
ID: 11974037
Why would you bother to see which are the duplicates ?
Just put in a Translation formula, to get rid of the duplicates :

@unique(TheField)

cheers,

tom
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 11974184
Or, if you really want to know, use
    @If(@Elements(TheField)=@Elements(@Unique(TheField)); @Success; @Failure("..."))
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11976162
Here is the formula to extract duplicates from a List

List := FIELD_NAME_HERE;
num := "0" : "1" : "2" : "3" : "4" : "5" : "6" : "7" : "8" : "9";
idList := @Subset( num*+ num; @Elements(List));
tmp1 := @Unique(@Replace(List; List; idList));
tmp2 := @Trim(@Replace(idList; tmp1; ""));
@Replace(tmp2; idList; List);

~Hemanth
0
 
LVL 2

Author Comment

by:mrt1
ID: 12008206
My 'list' is actually a concatenation of several list fields - that is why I'm looking for duplicates. I need to return the duplicates themselves - not just a boolean value. This calculated field is going to be displayed on the form as a validation warning -so that users are made aware of the duplicates.

Isn't there a more elegant way of doing it that having to hard code a list of numbers ( There isn't an upper limit to the number of entries in the list, so I don't really want to do this).
I could probably do this using Lotus script, but I just thought it would be simpler using a formula.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 200 total points
ID: 12008274
That is what my formula does.. it returns the duplicates...

list of numbers can be expanded upto any value.. right now it give 100 values.. but it can be increased by appending *+ num to the existing one

eg:
num*+ num*+ num will give 1000 values, num*+ num*+ num*+ num yields 10000 values
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need a tweak in Column code (in Notes view) 5 58
HP DP 7.03 and lotus collaboration suite 9 3 151
Lotus Notes 6.5.5 6 206
Counting documents in a Domino View 3 59
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now