I had set a parameter in an ArcGIS custom tool to populate a list upon initialization in an ArcGIS Desktop tool. The parameter has the following properties:
- Data Type = String
- Required
- Input
- Multivalue = Yes
- Filter = Value List
In the validator, I scripted some logic that builds a list in a certain order and is then passes it into the parameter using the following:
valueList = ['Montreal', 'Toronto', 'Vancouver', 'British Columbia', 'Ontario', 'Quebec']
self.params[4].filter.list = valueList
self.params[4].values = self.params[4].filter.list
The list above is an example of how my list is constructed, where I wanted all the city names first and then the provinces after. The cities are in alphabetical order and then the provinces are. When I pass the list into the parameter, the parameter honors the order of the list. This in in the Desktop environment.
I am migrating the tool into ArcGIS Pro/Python 3 using the same validator script and as I noted in a previous post that the behavior of multi value parameters have changed slightly. In the Desktop environment, the list would populate in the parameter along with check boxes next to each item so the user can toggle the items that want the tool to run on:

In the Pro environment the parameter will populate the list, but in order for the user to choose the items from the list they want, there is a drop down button above the parameter that pops out the same list in a new menu where they have the option to toggle on or off the items (see highlighted button below). The second image shows the popout list.


Now the issue is, the original list will populate in the order that I have set in the validator, however the popout list will only populate in alphabetical order. This is onerous for my users because the list I actually use is quite large and we want to have some of the more important items in the list at the top for ease of access and to prevent the users from scrolling through the list for these items when they are set in alphabetical order.
Is there any way to change how the popout list orders the items from the list?
Thanks