I have a Text field (Status), which I need to enter a string ('Existing') into all the cells of this field. I have 300 records and prefer to do it via Python or JavaScript. For some reason, I get error messages for my script. Can anyone help me with that? Thanks.
Solved! Go to Solution.
The only reason this wouldn't work is if your field was not a text field, or your text field character limit was less than 8 characters.
If you are having issues with a script, it is recommended to post the script and the error so people know where you are going wrong.
http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/calculate-field.htm
arcpy.CalculateField_management("yourfilehere", "Status",
'Existing', "PYTHON_9.3")
Thanks for your response. I am using the Field calculator. Could you please give the script I should enter into that? By the way, my field name is Status.
My script:
!Status!.str('Existing')
Error message:
There was a failure in processing....
Try just putting in 'Existing' as your Expression.
Already did. Same error message.
Awesome! Thank you so much. It worked!
Sometimes a picture is worth about 25 words....
Did you try the code posted by iamurray, from your original question I think that code should work.