ui.Dialog.createInputArrayFrom
Creates an ui.Dialog object to implement a dynamic
INPUT ARRAY FROM.
Syntax
ui.Dialog.createInputArrayFrom(
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 ARRAYof aRECORDstructure, with anameandtypemember of typeSTRING. - screenRecord is the name of the screen array (defined with
the
SCREEN RECORDinstruction in form files).
Usage
The
ui.Dialog.createInputArrayFrom() class method creates a dialog object to
implement the equivalent of a static INPUT ARRAY
FROM block.Note: 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.
A dynamic input array dialog behaves like a static INPUT ARRAY using the
WITHOUT DEFAULTS option: The values set in the internal rows before starting the
dialog will be used. However, like with a static INPUT ARRAY, when adding a new
row, the DEFAULT attributes of the form-fields are used.
The second parameter passed to the createInputArrayFrom() 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,
...
);
ENDFor 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.createInputArrayFrom(fields, "sr_custlist")
...