Sorting Of Tablebox Control

Hello members, First time posting to this site.

Using an old version of NAV. 4.0 (SP3)

I have a Tablebox control that is bound to the Service Header table. There are additional columns in this control that are bound to variables which are set in the Form - OnAfterGetRecord trigger.

Because these values are not fields in the Service Header table, I cannot create new table keys to allow a sort by them.

I have a requirement to sort by one of these columns in the Tablebox. Is this possible ?

Unfortunately the only way is to add this new fields on Service Header or viceversa (if the other variables refer all to the same table), base on your form on that table.

Hello Daniele and thankyou for your reply.

I am sorry but your response has slightly confused me. These additional columns which are bound to variables, show values from a customer comment table not the service order table which the form is bound to.

So in OnAfterGetRecord, the customer comment table is looked at using CAL code, and the last customer comment is then set against a variable, which then shows in the relevant column of the TableBox control.

I don’t want to change the structure of the form or add fields to the Service Header table.

Is it possible to sort by this column. Fine if the answer is no as I will then report back to my end user.

I understood the other fields are variables related to another table: if you cannot change the structure of your form I confirm it’s not possible to perform a sorting on fields coming from customer comment table.