Advanced Customization > Using Reusable Components > Additional Configuration Information > Using the Ordinal Configuration Field
  
Using the Ordinal Configuration Field
Many reusable components use the ordinal configuration field to set the order in which elements appear in the component user interface. For example, the Tile component uses the ordinal to set the order of tiles, and the Action Bar component uses it to set the order of actions. For all reusable components aside from the Action Bar, only non-negative values for the ordinal are supported, and negative values are treated as invalid inputs. The Action Bar does support negative ordinal values. All reusable components support zero as an ordinal value.
The following is an example of how the ordinal appears in a component configuration:
"items": [
{
"id": "RecurringCost",
"ordinal": 1
},
{
"id": "NonRecurringCost",
"ordinal": 0
},
{
"id": "Category",
"ordinal": 3
},
{
"id": "RequestPriority",
"ordinal": 2
}
]
The items in the above example appear in the user interface in the order NonRecurringCost, RecurringCost, RequestPriority, Category.
If there are no ordinal values defined in the component configuration, then the items appear according to their order in the configuration. If the order of items is tailored in the tailoring page, then the ordinal values are overridden and the order in the user interface reflects the tailoring.
The following is a list of possible input cases for ordinal values and what is expected in those cases:
Case
Example of Ordinal Values
Behavior in User Interface
Order values are sequential values.
1 2 3 4
Items appear in order of ordinal values.
Order values are nonsequential values.
2 5 7 8
Items appear in order of ordinal values.
Two items have the same ordinal value.
1 2 2 4
Items appear in order of ordinal values. Items with the same ordinal value appear according to their order in the configuration.
During runtime, the INFO message is logged to the log file.
One or more items do not have ordinal values.
1 2 [empty] 4
Items appear in order of ordinal values. Items without ordinal values appear last. If multiple items do not have ordinal values, they appear at the end, according to their order in the configuration.
During runtime, the INFO message is logged to the log file.
One or more items have invalid inputs for ordinal values.
1 2 “string” 3
Items with invalid ordinal values are treated as items that do not have ordinal values. They appear last, and in the case of multiple items with invalid ordinal values they appear according to their order in the configuration.
During runtime, the INFO message is logged to the log file.