I am setting up the parameters in a Python toolbox. I have a parameter that I would like to list fields based on a user input feature class. I am wondering if it is possible to list fields based on two feature classes.
def getParameterInfo(self):
input_data = arcpy.Parameter(
displayName = "Input data to be fuzzed to a grid",
name = "input_data",
datatype = "GPFeatureLayer",
parameterType = "Required",
direction = "Input")
existing_grid = arcpy.Parameter(
displayName = "Existing Grid",
name = "site_desc",
datatype = "GPFeatureLayer",
parameterType = "Optional",
direction = "Input")
output_fields = arcpy.Parameter(
displayName = "Fields to be Included in Output Fuzzed Data",
name = "output_fields",
datatype = "Field",
parameterType = "Required",
direction = "Input",
multiValue = True)
output_fields.parameterDependencies = [input_data.name]
I would like for the user to be able to also choose fields from the existing_grid dataset, in addition to the input_data dataset.
How do I include the fields from both in the field list?
I tried adding it separately and including it in the brackets, but this just caused the tool parameter to be blank.