Re: FORMS: SORTING ON NON DB FIELD!!! POSSIBLE?

From: Ken Brouillette <kabroui_at_envc.sandia.gov>
Date: 1995/04/12
Message-ID: <3mhl2a$9kh_at_news.sandia.gov>#1/1


boj_at_cti.ulaval.ca (Jean-Marc Boivin) wrote:

>

> Maybe somebody can help....
>
> In forms 4.0 I have a block wich is base on a table. In this bloc I have a
> field derived from a other table. So it look's like this:
>
> ORDER
>
> no. order no. client name
> 99999 999999 xxxxxxxxxxxxxxxxxx
> 99999 999999 xxxxxxxxxxxxxxxxxx
>
> The field name come from a other table and extracted on the post-query.
>
> Is there a way to display the data ordered by name (a kind of local sort in a
> block)?????

To be able to do this as you are attempting would require you to pass your derived field name from the post query trigger back to the order by criteria on the query that has already taken place. I suppose you could somehow trap the results of the first query, make the connection between the two tables and resort, but sounds like a lot of work... Have you considered changing your database design? For example, if the app is read only you could create a view, build the form block on the view, and order by the 'name field' using the block property sheet.
Also, if the name attribute you wish to sort on has a one to one correspondence with the rows in the other table, it seems to me the data should all be in one table. If it is one to many, then you could create a foreign key constraint back to the table with the name and perform the order by on the foreign key field. Hope this helps.

Ken Received on Wed Apr 12 1995 - 00:00:00 CEST

Original text of this message