AnsweredAssumed Answered

Filter Lists on Parameters Python Toolbox

Question asked by matthewrusso on Dec 28, 2015
Latest reply on Dec 29, 2015 by matthewrusso

For some reason I am running into an issue on a filter list for my tool box.

 

Below is my Code:

 

def getParameterInfo(self):
   """Define parameter definitions"""
   prod = "\\hqstore\geostore\Software\Scripts\Python_Toolbox\ConnectionFiles\PRODUCTION_10.2.2_GISUser_Default.sde"
   test = "\\hqstore\geostore\Software\Scripts\Python_Toolbox\ConnectionFiles\Test_10.2.2_GISUser_Default.sde"
   dev = "\\hqstore\geostore\Software\Scripts\Python_Toolbox\ConnectionFiles\Dev_10.2.2_GISUser_Default.sde"

   from_database = arcpy.Parameter(
   displayName = "From Database",
   name = "From_Database",
   datatype = "DEWorkspace",
   parameterType = "Required",
   direction = "Input")

   #from_database.filter.type = "ValueList"
  #from_database.filter.list = [prod, test]

   to_database = arcpy.Parameter(
   displayName = "To Database",
   name = "To_Database",
   datatype = "DEWorkspace",
   parameterType = "Required",
   direction = "Input")

   #to_database.filter.type = "ValueList"
  #to_database.filter.list = [test, dev]

   parameters = [from_database, to_database]
   return parameters

 

 

 

any ideas why this is not working? the filters are commented out... so my tool works

 

# Ignore my spacing it is just how the copy paste ended up

Outcomes