ui.Dialog.addInputArrayFrom
Adds a sub-dialog of type INPUT ARRAY FROM
to an
existing ui.Dialog
dynamic dialog.
Syntax
ui.Dialog.addInputArrayFrom(
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.addInputArrayFrom()
class method adds a sub-dialog equivalent to a
INPUT ARRAY FROM
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 addInputArrayFrom()
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 next 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.
Example
DEFINE fields DYNAMIC ARRAY OF RECORD
name STRING,
type STRING
END RECORD
DEFINE d ui.Dialog
...
LET d = ui.Dialog.createMultipleDialog()
...
CALL d.addInputArrayFrom(fields, "sr_custlist")
...