DTRHELP.HLB  —  Commands Statements Clauses, DISPLAY FORM Statement, Examples
       The following example shows that you can display a form for
       a domain even if the form was not specified in the domain
       definition:

       DTR> DISPLAY_FORM YACHTF IN FORMSLIB;

       The following example displays the MANUFACTURER and MODEL fields
       on a form for the first five records of YACHTS:

       DTR> FOR FIRST 5 YACHTS
       CON>      DISPLAY_FORM YACHTF IN FORMSLIB USING
       CON>          BEGIN
       CON>             PUT_FORM MANUFA = MANUFACTURER
       CON>             PUT_FORM MODEL = MODEL
       CON>          END;

       The following example displays the MANUFACTURER and MODEL fields
       on a form for the first record of YACHTS and assigns the values
       to two variables, BUILT and MODELLER:

       DTR> DECLARE BUILT PIC X(10).
       DTR> DECLARE MODELLER PIC X(10).
       DTR> FOR FIRST 1 YACHTS
       CON> DISPLAY_FORM BOATS IN [MORRIS]DTR32.FLB USING
       CON>     BEGIN
       CON>       PUT_FORM MANUFA = MANUFACTURER
       CON>       PUT_FORM MODEL = MODEL
       CON>     END  RETRIEVE USING
       CON>        BEGIN
       CON>          BUILT = GET_FORM MANUFA
       CON>          MODELLER = GET_FORM MODEL
       CON>        END
       DTR> PRINT BUILT

         BUILT

       ALBERG

       DTR> PRINT MODELLER

        MODELLER

       37 MK II

       DTR>

       You can use a form to store and modify values for selected
       fields. You can also associate more than one form with a single
       domain. See the DEC DATATRIEVE Guide to Interfaces for more
       examples.
Close Help