Dear all, please tell me, what code should I type in the calculator ArcGIS for fill strings with the value from the previous strings (from different columns)
Would you also be wanting to add together 698 + 349, or just return the last number - 349, or the first - 698?
What is this table? It really seems a truly horrific way to store data.
just return 698.- (as text)
Yes, I agry, it's terrible)))
There is no easy solution
The quickest would be to use
TableToExcel Table To Excel (Conversion)—ArcGIS Pro | Documentation
fix the table up there then use
Excel To Table (Conversion)—ArcGIS Pro | Documentation
to bring the table back.
If that table is part of a feature class, then you will have to Join it to the original featureclass
It's very messy, but this should work (you'll have to enter the first value manually after). I'm also not sure how it will cope with the logical test on empty strings rather than Null (None type) but we can adjust, or possibly export to a table which sets Null values.
pre-logic script code block
true_false = False
value = ''
def my_function(field1, field2):
global true_false
global value
if field1:
true_false = True
return value
elif true_false:
value = field2
true_false = False
Field3 =
my_function( !Field1!, !Field2!)