I'm trying to set the values of one control (Multi-value, data type: string <via checkboxes>) to another parameter control (Multi-value, data type: "any value" which produces a drop down with grid for items entered or selected with the add, delete, and re-ordering (up/down) buttons).
The goal is to use the reorder buttons on the 2nd control (of the auto-populated items) to reorganize the list by moving rows up and down, then taking the values out (as text type is fine) and processing them further.
The issue is that I can get the items to populate into the 2nd control (via the ToolValidator class, updateParameters method) but I can't change their order. If I use the text entry box to populate the grid, it will allow me to change the order of the items.
Here's the updated code snip:
"""Setup arcpy and the list of tool parameters."""
self.params = arcpy.GetParameterInfo()
PriorParam = ""
"""Refine the properties of a tool's parameters. This method is
called when the tool is opened."""
PriorParam = ""
global PriorParam, selected_items_list
domains = arcpy.da.ListDomains(self.params.value)
self.params.filter.list = [domain.name for domain in domains if domain.domainType == "CodedValue"]
#Probably a more direct way to grab the actual domain object but this works for now.
for domain in domains:
if domain.name == self.params.value:
coded_values = domain.codedValues
arcpy.AddMessage("Param5 didn't change after validate review.")
Here's what the parameter page looks like:
Even though the Up/Down arrows are enabled, they don't actually re-order the items. Am I using the wrong Data Type or is there some other storage location I should manually be moving the items from the "Code(s) to move" to get them into the SequenceTheMoveCodes parameter control?