Header sorting tableview by displayvalue

We have a lot of forms with a tableview, some fields have a valuelist to display a name. When clicking the header to sort the foundset it will sort on the foundset value (int) but I want to sort on the display value (from valuelist). Is this possible?

Example:

Order form shows all orders, one field in the form is customer_id with valuelist to display the customer name.

Now lets say we have 2 customers with orders in the list.

customer with id 1 and name Michel
customer with id 2 and name Jan

When we click on the header, Michel will show above Jan.

You have to write your own custom sort method then. You can execute a custom sort in tableview if onAction method of the labelfor label is defined or onSort command is defined. You can call there a foundset.sort to sort by the columns you want.