Subject RE: [IBO] How to sort a column by it's lookup values?
Author IBO Support List
Patrick,

I do not have a built-in way to do a dataset record ordering override.

IBO is more of a server-centric architecture. If you are using an IBOQuery
you may be able to take the data from your query and push it into a
TClientDataset or some other flavor of a TDataset based in-memory dataset
that has such capabilities in it.

The ability to do this is one of my higher priority feature additions and
your request here heightens my motivation to go ahead and introduce a means
for this to be accomplished.

Jason

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of patrick_marten
Sent: 03 December 2012 02:30 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] How to sort a column by it's lookup values?

Hello,

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...

Patrick



------------------------------------

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links