ui.Dialog.addDisplayArrayTo
Adds a sub-dialog of type DISPLAY ARRAY TO
to an
existing ui.Dialog
dynamic dialog.
Syntax
ui.Dialog.addDisplayArrayTo(
fields DYNAMIC ARRAY OF RECORD
name STRING,
type STRING
END RECORD,
screenRecord STRING )
- fields is the list of form fields controlled by the dialog.
This must be a
DYNAMIC ARRAY
of aRECORD
structure, with aname
andtype
member of typeSTRING
. - screenRecord is the name of the screen array (defined with the
SCREEN RECORD
instruction in form files). This name will also identify the sub-dialog in dialog events and API calls.
Usage
The ui.Dialog.addDisplayArrayTo()
class method adds a sub-dialog equivalent to a
DISPLAY ARRAY TO
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.
The second parameter passed to the addDisplayArrayTo()
method is the name of the
screen record which groups the fields together, for the list view of the form. This second parameter
will also be used to identify the sub-dialog.
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.createMultipleDialog()
...
CALL d.addDisplayArrayTo(fields, "sr_custlist")
...