When working with NeXTensio forms and with tables that contain ordered fields (order that is not established by the ID, but by entered values), you should use the Auto-increment Column server behavior. The order aspect is present in NeXTensio Lists to display records as intended (their order can be changed both in browser and database). In NeXTensio Forms, the order column must have unique values.
This server behavior is a trigger that registers itself to an Insert or a Custom transaction, automatically computing the value for the order column specified in its options. This value is computed by determining the maximum value already inserted, and adding 1 to it.
The server behavior is automatically added when using the Create NeXTensio Form Wizard, and setting a value in the Move up/down column drop-down menu in the wizard's last step.
If building a form manually, or if you haven't selected a Move up/down column in the wizard, you can access this server behavior from the Application panel, Server Behaviors -> + -> MX Kollection -> Forms -> Advanced -> Auto-increment Column. The dialog box opens, containing two tabs.
In the Basic tab, set the Table
column containing the order values:

In the Advanced tab, set the properties
regarding the trigger:

To read all the explanations regarding the fields of this interface, see the Advanced tab.
Note: If you use the order field for
a NeXTensio list, but you neglect to select
it in the corresponding form (either as a simple field or as the Move up/down column in the final wizard step),
the newly inserted records will have NULL
for the order column, which means that there will be multiple records
with the same order.