1

I am using ArcGIS Pro.

I have this set of points where I like an unique id (uid). The only thing they need to be unique is a counter of some sort at the end.

I have another field with some id that should be infront (number), so my expression would be something like:

"!number!"+ INCREMENT + "h"

Is this doable?

enter image description here

  • I usually create a Point_ID field as "OBJECT_ID +1" ... I do the +1 so that my first point is at 1 not 0. You can do these easily in Calculate Field or in ArcPy. – AlexS1 Mar 6 at 18:11
3

If you just want to add a counting number (does not matter if the value is unique or not, or number of unique values) then try:

Pre-logic:

count = 0
def uidcreator(a):
    global count
    count+=1
    return "{0}-{1}h".format(a,count)

Call with:

uid=

uidcreator( !SOMEFIELDNAME!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.