ArcGIS – find duplicate field-values in table

A short Python-Code in field-calculator will do the job – the result is in a new field with 0/1-values indicating if there is a duplicate for a given attribute.

ArcGISPy_duplicates1

Step 1: Add a field e.g. „Duplicate“ (type short integer)

Step 2: Open field-calculator for this field and use the following Python-Code (enable Python and show code-block like shown in the screenshot):

uniqueList = []
def isDuplicate(inValue): 
  if inValue in uniqueList: 
    return 1 
  else: 
    uniqueList.append(inValue) 
    return 0

In the bottom-field (Duplicate =) enter

isDuplicate(!FIELDNAME!)

FIELDNAME is the field in which you want to find the duplicates.

ArcGISPy_duplicates2

Comments and suggestions: iSticktoit.net on Facebook