AnsweredAssumed Answered

Labeling the sequence using concatenation

Question asked by rudinirudini on Oct 27, 2018
Latest reply on Nov 15, 2018 by xander_bakker

Hi again.. 
sorry for asking so many questions
i just found interest way working arcgis with python..
btw im new to this way of working so im sorry if the question sometime hard to understand..


so here is my question..
i have feature point data with 3 fields in table attribute (objectID, shape and sequence)..
i want to add another field lets say called "name_sequence)..

in the name_sequence field i want to add text which have format "x+yyy", ("x", "+", "yyy")

in loop every 100, start with 0+000..

so it become like this

0+000, 0+100, 0+200, .... 0+900

the point after +900 it will add "x+1" so in data no 11 it'll show 1+000 after that they will have same sequence as i mention above..
furthermore, after i searching the code i found we can use range function and concat function to do that..
so i come with the code like this..

import arcpy

new_field = 'Seq_Name' #Change
fc = r'directory' #Change

arcpy.AddField_management(in_table=fc, field_name=new_field, field_type='TEXT')

for i = 1 to 10
a = i
b = i*100
srt_join = concat(srt(a),"+", srt(b))
end for

i know it might be totally wrong code or it is not complete yet.

so i want to know what should i add for this code?

or do you have another way to do this without arcpy?

and i want know new understanding about python's things.. 

for your understanding i attach the result of my data which i working in excel..
thanks for your time