Get unique field values

/ Published in: Python
Save to your folder(s)

To be used in the Python palette window.

Copy this code and paste it in your HTML
  1. fieldName = ""
  2. namesList = sorted(set((row.getValue(fieldName) for row in arcpy.SearchCursor(r'',fields=fieldName))))
  3. for x in namesList:
  4. print x

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.