An info box has an underlying query. It has an object called "query" that has a property Underlying Query. The value of this property is a SQL statement that determines what data is shown in the info box.
Editing an underlying query can be a quick and elegant way to change the data behaviour of a window. For example:
•If you only need a small number of columns from a table with many columns, enumerate the columns you need in the SELECT clause. •If you only need a subset of the records, add a WHERE clause. You can do this in the underlying query statement itself or in the query object's "WHERE Clause" property.
The underlying query of a default info box of types Info Window, Lookup Window, Secondary Window on table PERSON is:
SELECT * FROM person p
|
The underlying query of a default info box of type Related Window for a Relationship "Person makes Reservation" is:
SELECT * FROM RESERVATION r
WHERE ( :"Parent*PERSON_ID" = r.MADE_BY OR (:"Parent*PERSON_ID" IS NULL AND r.MADE_BY IS NULL))
This statement uses old-style navigation paths.
|
The underlying query of a default info box of type Subtype Window follow the pattern:
SELECT primary-key-column(s)
, subtype-column
, subtype-column
, ...
FROM subtype
where subtype-column is a column that is in the subtype but not in the supertype.
For example, the underlying query of a default info box of types Info Window, Lookup Window, Secondary Window on table GUIDE, subtype of PERSON, is:
SELECT g.person_id
, g.bank_account
, g.db_user
, g.experience
FROM guide g
|
See also
Data Synchronization
Joined Columns
Extra Queries
|