I've been trying to figure out how to do almost exactly this. Thanks! One thing I'm curious about is the updateParameters function. Is there any reason to loop through each layer rather than just using the index of the last row directly? something like this: def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
# Update drop down for second column. Logic is that the last entry in
# the value table is the one you want to select a field ID for.
if parameters[2].altered:
# Return a list of lists
lol = parameters[2].values
# The number of rows in the table
# Use numrows to refer directly to last row rather than looping through without doing anything
numrows = len(lol)
# now update filter to list only the fields for the FeatureLayer in the last row.
lay = lol[numrows][0]
fi = lol[numrows][1]
fields = arcpy.ListFields(lay)
l=[]
for f in fields:
if f.type in ["Integer","OID"]:
l.append(f.name)
parameters[2].filters[1].list = l
return
... View more