ui.Dialog.addConstructByName

Adds a sub-dialog of type CONSTRUCT BY NAME to an existing ui.Dialog dynamic dialog.

Syntax

ui.Dialog.addConstructByName(
   fields DYNAMIC ARRAY OF RECORD
                        name STRING,
                        type STRING
                    END RECORD,
   name STRING
   )
  1. fields is the list of form fields controlled by the dialog. This must be a DYNAMIC ARRAY of RECORD structure, with a name and type member of type STRING.
  2. name is the sub-dialog identifier. This name is used to identify the sub-dialog in dialog events and API calls.

Usage

The ui.Dialog.addConstructByName() class method adds a sub-dialog equivalent to a CONSTRUCT BY NAME block, to the dynamic multiple dialog created with ui.Dialog.createMultipleDialog.

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

This second parameter will be used to identify the sub-dialog.

Important: Static CONSTRUCT dialog instructions use the data types of the fields defined in the .per form specification file. Unlike static CONSTRUCT, the dynamic construct uses the data type provided in the dynamic array defining the list of fields.

Example

DEFINE fields DYNAMIC ARRAY OF RECORD
                        name STRING,
                        type STRING
              END RECORD
DEFINE d ui.Dialog
...
LET d = ui.Dialog.createMultipleDialog()
...
CALL d.addConstructByName(fields,"const1")
...