I have a Geoprocessing Script Tool that auto-populates parameters via the initalizeParameters function of the ToolValidator class. This works well when the Tool is run from the toolbox.
Code:
def initializeParameters(self):
# Customize parameter properties.
# This gets called when the tool is opened.
parcels = ['test1','test2']
valueTable = arcpy.ValueTable(len(parcels))
valueTable.setColumns(["GPString","GPDouble"])
for parcel in parcels:
valueTable.addRow([parcel, None])
self.params[0].value = valueTable
Tool Display when open from Toolbox:
This does not run as expected when using Tasks. Task Display:
Only the first item in the parcels list is loaded. There are no errors reported. Does anyone have any suggestions or workarounds? I am using Pro 3.1.0.
Thanks