ui.Dialog.createConstructByName
Creates an ui.Dialog object to implement a dynamic
CONSTRUCT BY NAME.
Syntax
ui.Dialog.createConstructByName(
fields DYNAMIC ARRAY OF RECORD
name STRING,
type STRING
END RECORD
)
RETURNS ui.Dialog
- fields is the list of form fields controlled by the dialog. This must be a
DYNAMIC ARRAYofRECORDstructure, with anameandtypemember of typeSTRING. - The method returns a new
ui.Dialogobject.
Usage
The ui.Dialog.createConstructByName() class method creates a new dialog object
to implement the equivalent of a static CONSTRUCT 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.
Like static CONSTRUCT dialog instructions, the dynamic construct dialog uses the
data types of the fields defined in the .per form specification file. The data
types provided in the dynamic array defining the list of fields are ignored.
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 fields[1].name = "cust_id"
LET fields[2].name = "cust_name"
LET fields[3].name = "cust_addr"
LET fields[4].name = "cust_crea"
-- Field types are taken from the current form
LET d = ui.Dialog.createConstructByName(fields)
...