Hello everyone, very new to Python. Having a ton of fun and taking it slow. First post:-)
Can't get passed this one for some reason. I am using ArcGIS Pro 3.1.2 and using to NotePad++. I am trying to use GetParameter or GetParameterAsText to pass an alphanumeric value and it just won't go. I have tried to pass as a String and Any Value and continue to get the same error.
Please feel free to educate and direct towards resources.
import arcpy
fc = r'C:\Users\rfitchhorn\Documents\OneDrive - Great Plains Communications\Requests\Vitruvi\Vitruvi Upload\Vitruvi Upload.gdb\Span_230824A_Smile_Station'
wo = arcpy.GetParameter(0)
arcpy.management.CalculateField(fc, "Identify", wo)
Solved! Go to Solution.
Since its alphanumeric, it should be a string, so it should be arcpy.GetParameterAsText(0)
The wo variable is being passed to the Calculate field method in the expression spot, so it needs to be an expression in sql form. What do you want to do with the 230824A being passed in?
Check out the docs for calculate field
Since its alphanumeric, it should be a string, so it should be arcpy.GetParameterAsText(0)
The wo variable is being passed to the Calculate field method in the expression spot, so it needs to be an expression in sql form. What do you want to do with the 230824A being passed in?
Check out the docs for calculate field
Thank you JeffK. Took a bit more reading to understand what I need to do but finally got it. Thanks for the resources!