The DIALOG statement can have an optional ATTRIBUTE clause that can include the following:
If this attribute is absent, the cursor moves through the fields in the order in which they are specified in the corresponding INPUT, CONSTRUCT or INPUT ARRAY statement. If it is present, the field order is defined by the TABINDEX attribute value of each field:
DIALOG ATTRIBUTE(FIELD ORDER FORM)
...
END DIALOG
This attribute indicates that the DIALOG must be sensitive to the program variable changes. The UNBUFFERED attribute can have an optional Boolean value, e.g.: UNBUFFERED = 1 or UNBUFFERED = 0. The TRUE (1) value is equal to the keyword UNBUFFERED used by itself, the FALSE(0) value is equal to omitting the attribute.
DIALOG ATTRIBUTE(UNBUFFERED)
...
END DIALOG
The UNBUFFERED dialog mode allows you to avoid having to update the field buffer using the built-in functions before being able to use the value of the current field in a control clause. If the UNBUFFERED attribute is present or set to TRUE, the following actions are undertaken by the program, if any ON ACTION or ON KEY block is triggered:
If the UNBUFFERED attribute is absent or set to FALSE, the following actions sequence executed by the program, if any ON ACTION or ON KEY block is triggered:
This attribute triggers the execution of all the BEFORE blocks of the sub-dialogs.
Find the example in the dropdown area below:
MAIN
DEFINE arr1, arr2, arr3, arr4 DYNAMIC ARRAY OF RECORD f11, f12 STRING END RECORD
OPEN WINDOW w WITH FORM "10774/10774_before_dialog"
DIALOG
INPUT ARRAY arr1 FROM scr1.*
BEFORE INPUT
DISPLAY "BEFORE INPUT arr1"
ON ACTION arr1
DISPLAY "arr1"
END INPUT
DISPLAY ARRAY arr2 TO scr2.*
BEFORE DISPLAY
DISPLAY "BEFORE DISPLAY arr2"
ON ACTION arr2
DISPLAY "arr2"
END DISPLAY
INPUT ARRAY arr3 FROM scr3.*
BEFORE INPUT
DISPLAY "BEFORE INPUT arr3"
ON ACTION arr3
DISPLAY "arr3"
END INPUT
DISPLAY ARRAY arr4 TO scr4.*
BEFORE DISPLAY
DISPLAY "BEFORE DISPLAY arr4"
ON ACTION arr4
DISPLAY "arr4"
END DISPLAY
ON ACTION Exit
EXIT DIALOG
END DIALOG
DISPLAY "###############"
DIALOG ATTRIBUTES(EXECUTE ALL BEFORE)
INPUT ARRAY arr1 FROM scr1.*
BEFORE INPUT
DISPLAY "BEFORE INPUT arr1"
ON ACTION arr1
DISPLAY "arr1"
END INPUT
DISPLAY ARRAY arr2 TO scr2.*
BEFORE DISPLAY
DISPLAY "BEFORE DISPLAY arr2"
ON ACTION arr2
DISPLAY "arr2"
END DISPLAY
INPUT ARRAY arr3 FROM scr3.*
BEFORE INPUT
DISPLAY "BEFORE INPUT arr3"
ON ACTION arr3
DISPLAY "arr3"
END INPUT
DISPLAY ARRAY arr4 TO scr4.*
BEFORE DISPLAY
DISPLAY "BEFORE DISPLAY arr4"
ON ACTION arr4
DISPLAY "arr4"
END DISPLAY
ON ACTION Exit
EXIT DIALOG
END DIALOG
END MAIN
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://namespaces.querix.com/2015/fglForms" title="New Form 1">
<form.rootContainer>
<CoordPanel identifier="rootContainer" visible="true">
<Table visible="true" identifier="Table1" location="0,0" preferredSize="976,176">
<TableColumn text="Column 1" resizable="true" visible="true" identifier="tc_f1">
<TextField visible="true" identifier="f11"/>
<TableColumn.columnLength>
<GridLength/>
</TableColumn.columnLength>
</TableColumn>
<TableColumn text="Column 2" resizable="true" visible="true" identifier="tc_f2">
<TextField visible="true" identifier="f12"/>
<TableColumn.columnLength>
<GridLength/>
</TableColumn.columnLength>
</TableColumn>
</Table>
<Table visible="true" identifier="Table2" location="0,176" preferredSize="976,176">
<TableColumn text="Column 1" resizable="true" visible="true" identifier="tc_f4">
<TextField visible="true" identifier="f21"/>
<TableColumn.columnLength>
<GridLength/>
</TableColumn.columnLength>
</TableColumn>
<TableColumn text="Column 2" resizable="true" visible="true" identifier="tc_f5">
<TextField visible="true" identifier="f22"/>
<TableColumn.columnLength>
<GridLength/>
</TableColumn.columnLength>
</TableColumn>
</Table>
<TextField visible="true" identifier="f31" location="8,374" preferredSize="168,22"/>
<TextField visible="true" identifier="f42" location="672,374" preferredSize="168,22"/>
<TextField visible="true" identifier="f41" location="488,374" preferredSize="168,22"/>
<TextField visible="true" identifier="f32" location="192,374" preferredSize="168,22"/>
<TextField visible="true" identifier="f31" location="8,396" preferredSize="168,22"/>
<TextField visible="true" identifier="f42" location="672,396" preferredSize="168,22"/>
<TextField visible="true" identifier="f41" location="488,396" preferredSize="168,22"/>
<TextField visible="true" identifier="f32" location="192,396" preferredSize="168,22"/>
</CoordPanel>
</form.rootContainer>
<form.screenRecords>
<ScreenRecord identifier="scr1" fields="f11,f12"/>
<ScreenRecord identifier="scr2" fields="f21,f22"/>
<ScreenRecord identifier="scr3" fields="f31,f32"/>
<ScreenRecord identifier="scr4" fields="f41,f42"/>
</form.screenRecords>
</form>