FORMBUILD question???
Posted in 1996
The following question is directed to the use of the "FORMBUILD" form generator.....I don't have access to 4GL or ESQL/C! I have data from two tables displayed on a single form using a join. TABLE_A has rows differentiated by the column "unique_no". TABLE_B may have any number of rows where the "no" column value matches the TABLE_A "unique_no" column value, but each of TABLE_B's "matched" rows will have a unique "sub_no" column value. TABLE_A: TABLE_B: ---------- ---------- unique_no: .... + other_stuff no: sub_no: ... + other_stuff --------- -- ------ 1 1 1 2 1 2 3 1 3 4 ------------------------------- 5 2 1 . 2 2 . ------------------------------- . 3 1 . 3 2 . 3 3 3 4 3 5 3 6 ------------------------------- 4 1 . . . . To display a given "set" of data, I join TABLE_A and TABLE_B on the form: f00 = TABLE_A.unique_no; = TABLE_B.no; and, I always get the FIRST row of TABLE_B displayed, e.g. if I query the form for TABLE_A.unique_no = 3, I get the row from TABLE_B where sub_no = 1. Yes, by then selecting "Table", "Query",.., "Next/Previous" I can ultimately display all of TABLE_B's rows that result from the specified join, however...... Is it possible to "default" the form's display (via appropriate attribute selection/etc?) to show some particular row from the joined TABLE_B for a query of TABLE_A's "unique_no"? e.g. If I query the form for TABLE_A.unique_no = 3, I would like to see displayed from TABLE_B the row where sub_no = 5, NOT sub_no = 1. (The "largest value" of the "sub_no" column is saved in TABLE_A and is available to "calculate" any of the "sub_no" values desired - what I really want displayed is the "largest value - 1" row). Any suggestions appreciated ..... - I don't have access to 4GL or ESQL/C just FORMBUILD! Jim -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## ####### ## ## Jim Kistler ## ## ## ## kistler@hp-and.an.hp.com ## ## ## ## Hewlett-Packard Co. ## ##### #### Imaging Systems ## ## ## ## ## 3000 Minuteman Road ## ## ## ## ## Andover, MA 01810 ######## ## ## ## TEL: 508-659-2251 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~FAX: 508-687-7265~~~~~~~~~~