I'm making a custom tool that will allow the user to make many different changes to the fields of a chosen feature class or shapefile.
Part of my code is:
And then when I create the tool parameters I choose the Data Type as Data Element.
The next input I get from the user is the field from the fc that they want to use to copy data from into a new field.
For this parameter I've tried Field, Field Info and Field Mappings but none of them give me the fields of the inputted fc.
How can I link this parameter to the first one to give me a list of the fields within the fc?
Part of my code is:
Code:
fc = arcpy.GetParameterAsText(0)
The next input I get from the user is the field from the fc that they want to use to copy data from into a new field.
Code:
copy_field = arcpy.GetParameterAsText(1)
How can I link this parameter to the first one to give me a list of the fields within the fc?