Extra Queries for Related Information

Previous Next

See Also

You may show related information from other database objects in the box for a particular database object by defining an extra query for it. This extra query must be able to retrieve the appropriate value for each record in the box, and contain a join of at least the database object on which the box is based and the database object from which the related information is retrieved.

NOTE:

For standard "lookup fields" reproducing a value from a parent table in a child window, use joined columns. Joined columns are defined at column level in USoft Definer.

If you want the Tours window in the Travel Agency system to have an "additional field" showing the start date and end date for each tour, you must provide that window with the following extra query:

SELECT   c.start_date || ' , ' || c.end_date

FROM     schedtour_c, tour

RELATE   c "SUBJECT TO" h

If you want to provide it with an alternative prompt, you may add it to the underlying query as a display label (i.e. prompt):

SELECT   c.start_date || ' , ' || c.end_date "Your Prompt"

FROM     schedtour_c, tour

RELATE   c "SUBJECT TO" h