|
|
|
WADELIA |
|
|
|
|
(I) (C) |
|
Section for use
Syntax
The object is placed outside a list or table list:
GET_FORM_VALUE GraphicalObject ResultVariable.
GraphicalObject |
→ |
Graphical object with a VALUE property which can be changed via its graphical interface |
ResultVariable |
→ |
Variable of same Adelia type as the VALUE property of the GraphicalObject parameter |
The object is placed in a list or table list:
GET_FORM_VALUE ListObject LineNo ColInfo ResultVariable.
ListObject |
→ |
Graphical object with a LIST property |
LineNo |
→ |
Line number (starting with 1) in the ListObj list on which the ColumnObject is retrieved |
ColInfo |
→ |
ColumnObject | *SELECT | *CHANGE |
ColumnObject |
→ |
Graphical object defined as a column in the ListObject list. This graphical object must have a VALUE property which can be changed via its interface |
*CHANGE |
→ |
Indicates that the user wants to retrieve the changed state of line number LineNo |
*SELECT |
→ |
Indicates that the user wants to retrieve the selected state of line number LineNo |
ResultVariable |
→ |
If the third parameter is ColumnObject then ResultVariable contains the value of the ColumnObject for line number LineNo. ResultVariable must be of the same Adelia type as the VALUE property of the ColumnObject parameter.
If the third parameter is *SELECT then ResultVariable is *TRUE if line number LineNo is in the selected state. ResultVariable must be BOOL Adelia type.
If the third parameter is *CHANGE then ResultVariable is *TRUE if line number LineNo is in changed state. ResultVariable must be BOOL Adelia type. |
Description
This instruction retrieves the value entered by the user in a graphical object before executing the process associated with the Adelia event triggered by the user. The value of the GraphicalObject or ColumnObject is assigned to the ResultVariable variable.
Note: Graphical objects GraphicalObject / ListObject / ColumnObject must belong to the HTML form which is behind the Adelia event triggered by the user.
This instruction updates the reserved word *RETURN_CODE:
0 (*NORMAL): Operation completed successfully.
1: Operation was not completed successfully (internal error).
2: The execution context is associated with an event without validation. In this case, the output parameter ResultVariable is not specified.
3: Graphical object GraphicalObject, ListObject or ColumnObject does not belong to the HTML form behind the Adelia event triggered by the user.
For example
A PGM_A program which displays a counter initialized to 1 in a ENT_CNT entry field object which can be incremented by clicking on a BTN_1 button object (called "Increment").
|
Action |
Result page for the action in the browser |
Program state |
CANCEL block |
||
|
Enter URL of PGM_A (A1) |
Increment |
ENT_CNT: 1 |
|
||
Click on BTN_1 (A2) |
Increment
|
ENT_CNT: 2 |
|
|||
Click on Previous button |
Increment
|
ENT_CNT: 1 |
In the CANCEL block: ENT_CNT has 1 as value. The call to GET_FORM_VALUE ENT_CNT CNT sets 1 as CNT variable value. |
|||
Enter 3 and click on BTN_1 (A2) |
Increment
|
ENT_CNT: 4 |
|
|||
Click on Previous button |
Increment
|
ENT_CNT: 1 |
In the CANCEL block: ENT_CNT has 1 as value. The call to GET_FORM_VALUE ENT_CNT CNT sets 3 as CNT variable value. |
A PGM_A program which contains a BASKET_TBL list of items to order with three columns OUT_ARTICLE (description), ENT_QT (quantity) and BTN_CHANGE (called "Change"), which allows the user to change the quantity of an item to order in one click.
The quantities are changed directly in the DB by browsing the list to find the changed line (READ_LST *CHANGE).
|
Action |
Result page for the action in the browser |
Program state |
CANCEL |
|||||||||
|
Enter URL of PGM_A (A1) |
|
ARTICLE_TBL: Line 1 : "Pen", 2 Line 2 : "Pencil", 1 *SELECT : 0 *CHANGE : 0
|
|
|||||||||
Enter pencil "3" then click on BTN_CHANGE (A2) |
|
ARTICLE_TBL: Line 1 : "Pen", 2 Line 2 : "Pencil", 3 *SELECT : 0 *CHANGE : 0
|
|||||||||||
Click on Previous button |
|
(*1) ARTICLE_TBL: Line 1 : "Pen", 2 Line 2 : "Pencil", 1 *SELECT : 0 *CHANGE : 0
|
In the CANCEL block: ENT_QT for the line 2 has 1 as value.
The call to GET_FORM_VALUE ARTICLE_TBL 2 ENT_QT ART_QT sets 3 as ART_QT variable value.
The call to GET_FORM_VALUE ARTICLE_TBL 2 *CHANGE LINE_CHANGE sets *TRUE as LINE_CHANGE variable value.
|
(*1) Restores save associated with action A1 following the A2 cancellation request.