Reference attributes sort by index, not displayed text


If a table includes a referenced field (e.g., “Company”) and that is used in a sort clause, it appears that some “value” of the reference rather than the displayed information is used in the sort. See the attached screen shot (some text blurred to protect customer information)

As you can see, the Company field is included in the sort, but that appears to be the order in which items were added to that table, not sorted by the displayed value.

Is this known behavior? If yes, can you explain the rationale and how to fix this?