I'm doing a calculated field in Arcgis 10x desktop.
ROOTID field is a parcel ID (from another organization). example: 06-07- 43-0462-0000-0000
I'm changing the number in the field ASI_PID to be calculated to be: 07 43046200000000
ASI_PID is type: String and length=50
My calc is: Mid([ROOTID],4,2)+" "+Mid([ROOTID],8,2)+Mid([ROOTID],11,4)+Mid([ROOTID],16,4)+Mid([ROOTID],21,4)
But I get: 07 4-048-000-000 I don't want the dashes, and as you can see, I'm not adding any. I'd like a space after the first two numbers. I tried changing how many numbers at the position (like 4,5) but it still puts in the dash and leaves out a number.
What am I doing wrong?
Thank you!
Solved! Go to Solution.
Ken
tick python on
dump your expression from the last line and replace with mine
there is no prelogic code block
"".join([str(i) for i in !ROOTID!.split("-")[1:]])
python parser
rootid = '06-07- 43-0462-0000-0000' # which would be !rootid! in the expression
"".join([str(i) for i in rootid.split("-")[1:]])
'07 43046200000000'
Ken
tick python on
dump your expression from the last line and replace with mine
there is no prelogic code block
"".join([str(i) for i in !ROOTID!.split("-")[1:]])
Thank you! I ran mine first to get the numbers, then ran yours to eliminate the dashes.
Thanks!