Re: Order by non-base table fields
Date: Wed, 24 Jun 1998 16:30:59 +0400
Message-ID: <3590F183.9742339_at_dd.ru>
You can use stored function in the block ORDER BY clause. Use foreign key (base field) as parameter for this function.
I hope this help.
Fred Joughin wrote:
>
> Sorry, I wasn't very explicit about this. The non-base table field is a look-up
> populated in post-query. The base table is based on the Products table and contains
> a supplier_code which is a foreign key to the Suppliers table. The Suppliers table
> includes a field called 'name'. I want to list the products, ordered by supplier
> name.
>
> DanHW wrote:
>
> > >I have a simple block with some none base-table fields. I want the
> > >records in the block to be ordered by one of the non-base table fields.
> > >How can I do it ?
> > >
> > >Fred Jougin
> >
> > How is the non-base column getting filled? it sounds like every row returned
> > would have the same value, so any kind of order by would have no effect.
> >
> > That said, you can use form parameters and globals to generate the order by
> > clause at runtime, and use the SET_BLOCK_PROPERTY function to set the ORDER_BY
> > for the block. Set it in the PRE-QUERY trigger.
> >
> > Dan Hekimian-Williams
-- Valery A. Sorokin ProSoft, Russia, Moscow http://www.dd.ruReceived on Wed Jun 24 1998 - 14:30:59 CEST