Hello,
I am trying to create a custom tool to use in ArcPro that takes:
1) Input value--the feature class I want to work with
2) Input value--the name of the resulting output feature class from selection
3) Input value--the year in my data set that I want selected and the records copied into a new feature class
I am having trouble with the last part of my script:
import arcpy
# Setting some variables
inputfc = arcpy.GetParameterAsText(0)
outputfc = arcpy.GetParameterAsText(1)
year_value = arcpy.GetParameter(2)
where_clause = 'SURVEY_YEAR = {0}'.format(year_value)
arcpy.Select_analysis(inputfc, outputfc, where_clause)I get an execute error and it says that my parameters are not valid. I am not sure what is wrong--I am also newish to ArcPy which is why I am struggling with this one.
Thanks for your help!
Edit: here's a screenshot of the error message
