Updates the value of a '#'-or '@' field in the current
window.
|
Dialog.UPDATE([Number] [, Value1])
|
Parameters
- Dialog
-
Type: Dialog
The dialog you want to update.
- Number
-
Type: Integer
Each '#' or '@' field has a specific number. The Number argument
tells the system into which field it should insert Value. If you
omit this parameter, all '#' or '@' fields in the current window
are updated.
- Value
-
Type: Any
This value (or expression) can be any simple C/AL data type such
as Boolean, option, integer, decimal date, time, text and code. If
you omit this value, then the value from the variable in the
OPEN Function
(Dialog) call is used.
Remarks
Example
The following example shows how to update '#' fields in
a window.
This code example requires that you create the
following variables and text constants in the C/AL Globals
window.
Variable name |
DataType |
Length |
AccountInfo
|
Text
|
1024
|
AccountNo
|
Integer
|
|
TotalSum
|
Decimal
|
|
MyDialog
|
Dialog
|
|
Text constant name |
Constant value |
Text000
|
Account no. #1######\
|
Text001
|
shows a total of $ #2######
|
|
Copy Code |
AccountInfo := Text000 + Text001;
AccountNo := 5634;
TotalSum := 1000;
MyDialog.OPEN(AccountInfo); // Opens a window with '#'-fields.
SLEEP(5000);
MyDialog.UPDATE(1, AccountNo); // Fills in field 1.
SLEEP(5000);
MyDialog.UPDATE(2, TotalSum); // Fills in field 2.
SLEEP(5000);
|
When the dialog window first opens, the following
information is displayed:
Account no. . . . . shows a total of $. . . . . .
.
After the first SLEEP call, the value of the AccountNo
variable is inserted. After the second SLEEP call, the value of the
TotalSum variable is inserted.
See Also