Gather all documents for duplicates in a Field

I have a textlist field (FIELD A) on all documents in a database that is suppose to contain only unique values.

Due to an error in the past, some of the documents however are showing duplicate values in this field (FIELD A).

I want to gather all these documents within a view and copy them to a different folder. I know how to gather documents, put them in a view/folder etc.

The part I am not able to figure out is how do I check if this FIELD A has duplicate value in it.

Thanks in advance.

Subject: Gather all documents for duplicates in a Field

Try this:1) Create Field B (computed) with value @unique(A)

  1. if @Count(A) != @Count(A) then A has duplicate

Subject: Gather all documents for duplicates in a Field

@elements(FIELDA)!=@elements(@trim(@unique(FIELDA)));

returns true if duplicates are present in FIELDA

Subject: RE: Gather all documents for duplicates in a Field

Thank you all for pointing me in the right direction.

Subject: Gather all documents for duplicates in a Field

Build a document collection based on the value you want to check for duplication. If the count is >1, you have dups.

Subject: RE: Gather all documents for duplicates in a Field

Use LotusScript. Use a NotesViewNavigator to scan down the rows of a view that’s sorted by field A. On each iteration, remember the value you find. Compare the value from the last iteration with the value from the current iteration. If they are the same, then the document on the current row is a duplicate, and so is the one preceding it.