2

For example, for the following parameters defined in the parameters.xml, can I explicitly define the order of the parameters that they appear in the running GUI?

I do not thing they are ordered alphabetically.

<parameter name="Metabolism_min" displayName="2.1.2 Agent Metabolism (minimum)" type="int" defaultValue="1" />
<parameter name="Metabolism_max" displayName="2.1.2 Agent Metabolism (maximum)" type="int" defaultValue="4" />
<parameter name="InitEndownment_min" displayName="2.1.3 Agent Initial Sugar (minimum)" type="int" defaultValue="50" />
<parameter name="InitEndownment_max" displayName="2.1.3 Agent Initial Sugar (maximum)" type="int" defaultValue="100" />

1 Answers1

2

The way to do this is to use the display name as the ordering. For example, if I wanted to have the minimum values show up above the maximum values, I could do something like:

<parameter name="Metabolism_min" displayName="2.1.2.a Agent Metabolism (minimum)" type="int" defaultValue="1" />
<parameter name="Metabolism_max" displayName="2.1.2.b Agent Metabolism (maximum)" type="int" defaultValue="4" />
<parameter name="InitEndownment_min" displayName="2.1.3.a Agent Initial Sugar (minimum)" type="int" defaultValue="50" />
<parameter name="InitEndownment_max" displayName="2.1.3.b Agent Initial Sugar (maximum)" type="int" defaultValue="100" />

And this would result in the following:enter image description here

J. Ozik
  • 1,083
  • 5
  • 6
  • Great. It might be also useful to add an attribute to the 'parameter' element, that will give a sort-order preference (like a priority) – Dimitris Kremmydas Sep 25 '20 at 14:13
  • 1
    That's a great idea. If the response answered your question please accept it when you get a chance to help others looking for this information. – J. Ozik Sep 27 '20 at 18:13