FRAME-INDEX function
During a data entry statement, returns the subscript of the array element of the input field that the cursor is in as an INTEGER value. At other times, returns the subscript of the array element the cursor was in.
The FRAME-INDEX function is particularly useful if you want to provide the user with help for the input array element being edited.
Note: Does not apply to SpeedScript programming.Syntax
ExampleIn this example, the FRAME-INDEX function uses the cursor position to determine which option you have chosen:
Notes
- If the cursor is not in an enabled input field when the last input statement is executed, FRAME-INDEX returns a 0. For example, FRAME-INDEX returns 0 if the user presses END-ERROR on the previous input statement.
- The FRAME-INDEX value is set to 0 at the next pause (done by a PAUSE statement or automatically by the AVM) or at the next READKEY statement.
- If you are updating a subset of an array-for example,
TEXT(array-field[i TO 12])
, and you use a variable subscript(i)
, then FRAME-INDEX returns 0. If you use a constant subscript,TEXT(array-field[6 TO 12])
, then FRAME-INDEX returns the correct value.See alsoFrame phrase, FRAME-DB function, FRAME-FIELD function, FRAME-FILE function
OpenEdge Release 10.2B
|