Among other parameters in an ArcToolBox i developed, two string parameters. each one is filtred by a Value List.
lets say the first list is related to five Canada regions: ATL, PNR, PYR, QC and ON. each of those regions is composed of proinces and territories: ATL = NB, NL, NS, PE; ON=ON, QC=QC; PNR = AB, MB, NT, NU, SK and PYR=BC, YT. the Regions parameters is regions=arcpy.GetParameterAsText(4) and the provinces/terretories parameter is ProvTerri = arcpy.GetParameterAsText(5).
Now what I want is to automatically populate ProvTerri when I select one of the regions. I wrote the following code in validation, but it did not work:
if (self.params.value and not self.params.hasbeenvalidated):
self.params.filter.list = ["AB","MB","NT","NU","SK"]
if not self.params.value:
I also try to figure out the problem assuming that the problem come from the assessmenet of self.params.value. since it is a liste, I put after the first if:
if names1 = "PNR":
Thanks for your help