Subject How to sort a column by it's lookup values?
Author patrick_marten

in a table I have a column, in which I store integer values, which represent record IDs of another table. This second table stores the appropriate captions for the IDs.

In a grid I fill that column with those captions, while the actual values remains integer. It's not a joined query though, because I would need to join several tables, which would take longer to load the data.

In some cases I can't use the sorting features of the grid and have to do it on the dataset level. This works for "normal" columns, but it doesn't for the said column, because the dataset (IBOQuery) doesn't know anything about the captions and only knows the integer values.

Is there a way to sort the dataset based on the captions instead of IDs? Calculated fields don't work...