ui.Dialog.setDialogAttribute

Set an attribute to configure a dynamic dialog.

Syntax

setDialogAttribute(
   name STRING,
   value STRING )
  1. name is the name of the dialog attribute.
  2. value is the value of the dialog attribute.

Usage

The setDialogAttribute() method can be used to configure a dynamic dialog with attributes.

When defining a static dialog instruction, you can specify options with the ATTRIBUTES() clause:
INPUT BY NAME ... ATTRIBUTES(UNBUFFERED)
When creating a dynamic dialog, call the setDialogAttribute() method after creating a new dialog object (for example with createInputByName()):
LET d = ui.Dialog.createInputByName(fields)
CALL d.setDialogAttribute("UNBUFFERED",TRUE)
Or after adding a sub-dialog to a multiple dynamic dialog object (for example with addDisplayArrayTo()):
LET d = ui.Dialog.createMultipleDialog()
CALL d.addDisplayArrayTo(fields, "sr_custlist")
CALL d.setDialogAttribute("FOCUSONFIELD",TRUE)
Table 1. Attribute names for dynamic dialogs
Attribute name Possible values Description Dialog block equivalent
AUTO APPEND TRUE / FALSE When FALSE, INPUT ARRAY dialog denies automatic temp row creation when moving after last existing row. AUTO APPEND
APPEND ROW TRUE / FALSE When FALSE, INPUT ARRAY dialog denies row addition (at end of list). APPEND ROW
COUNT integer Defines the number of rows of the DISPLAY ARRAY or INPUT ARRAY. COUNT
DELETE ROW TRUE / FALSE When FALSE, INPUT ARRAY dialog denies row deletion. DELETE ROW
DOUBLECLICK identifier Defines the action name for the row choice (mouse click or tap) DOUBLECLICK
FIELD ORDER "FORM", "CONSTRAINED", "UNCONSTRAINED" Defines the tabbing order mode of form fields for this dialog. FIELD ORDER
FOCUSONFIELD TRUE / FALSE When set to TRUE, enables the field-focus mode in a DISPLAY ARRAY dialog. FOCUSONFIELD
HELP integer The help number of the help message. HELP
INSERT ROW TRUE / FALSE When FALSE, INPUT ARRAY dialog denies row insertion (before current row). INSERT ROW
KEEP CURRENT ROW TRUE / FALSE When TRUE, current row must remain selected after list dialog execution. KEEP CURRENT ROW
MAXCOUNT integer Defines the maximum number of rows to be entered in an INPUT ARRAY dialog. MAXCOUNT
NAME identifier Defines the name of the sub-dialog. NAME
UNBUFFERED TRUE / FALSE When TRUE, the dialog will use the unbuffered mode. UNBUFFERED
WITHOUT DEFAULTS TRUE / FALSE When TRUE, INPUT or INPUT ARRAY dialog must not use form defaults. WITHOUT DEFAULTS