ui.Dialog.createDisplayArrayTo

Creates an ui.Dialog object to implement a dynamic DISPLAY ARRAY TO.

Syntax

ui.Dialog.createDisplayArrayTo(
   fields DYNAMIC ARRAY OF RECORD
                        name STRING,
                        type STRING
                    END RECORD,
   screenRecord STRING )
  RETURNS ui.Dialog
  1. fields is the list of form fields controlled by the dialog. This must be a DYNAMIC ARRAY of a RECORD structure, with a name and type member of type STRING.
  2. screenRecord is the name of the screen array (defined with the SCREEN RECORD instruction in form files).
  3. The method returns a new ui.Dialog object.

Usage

The ui.Dialog.createDisplayArrayTo() class method creates a dialog object to implement the equivalent of a static DISPLAY ARRAY TO block.

The current form will be attached to the created dialog.

The method takes a list of field definitions as parameter, as described in Field definition for Dynamic Dialogs.

The second parameter passed to the createDisplayArrayTo() method is the name of the screen record which groups the fields together, for the list view of the form.

For example, in the following form definition, the screen record name is "sr_custlist":
...
INSTRUCTIONS
SCREEN RECORD sr_custlist
(
 customer.cust_id,
 customer.cust_name,
 ...
);
END

For more details, see Screen records / arrays.

A dynamic dialog can be configured with the setDialogAttribute() method.

Example

DEFINE fields DYNAMIC ARRAY OF RECORD
                        name STRING,
                        type STRING
              END RECORD
DEFINE d ui.Dialog
...
LET d = ui.Dialog.createDisplayArrayTo(fields, "sr_custlist")
...