How To Reorder The Inputs On Formula Types Generated By Formula Designer

By default, when an Input block is used by a Formula Type, its Order is set to 0. This is to prevent clutter in the Input Blocks.

There are two ways to resolve this issue:

  1. Manually change the order for each Formula Type

  2. Add an Order parameter to an Input Block and propagate it to the Input Generation Company Parameter table.

Solution 1. Manually Change the Order per Formula Type

After a Formula Type has been Activated and contains Input blocks, a new Company Parameter is generated. The table name follows the format AGR_FD_<Formula Type name here>_InputDefinitions (in version 1.0, it is AGR_<Formula Type name here>_InputDefinitions). Within this Company Parameter, the order of each input can be adjusted manually to meet specific needs.

Solution 2. Add an Order Parameter to Input Block

Another solution is to add a new parameter to each input block that will represent the order.

  1. Navigate to AGR_FormulaDesigner_CustomInputs library logic and in the Meta element for an Input Block under the “params” key add a new entry ["name": "order", "type": "number"].

  2. Ensure the parameter is included in the “label” key as well. For example, "Boolean Input with label {1}Is Broadcasted {2}with order {3}".

  3. Add the parametrized order to be saved into the Input Generation Company Parameter table.

  4. Navigate to AGR_FormulaDesigner_Deployment and in the populateInputGenerationTable function modify the (columnsData.ORDER.ATTRIBUTE): inputMeta.order – instead of reading the order from the meta, adjust it to read from the parameters, such as (columnsData.ORDER.ATTRIBUTE) : inputData.params.order. The key names have to match.

This will add an additional entry in the Input block that users must provide. This entry will be propagated to the Input Generation Company Parameter.