Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : CURSOROCC_VALUE

CURSOROCC_VALUE
Returns the value of a particular screen field that is selected by the cursor. (F)
Invocation
selected_value = CURSOROCC_VALUE(screen, scrtbl, scrfld)
 
Example
The rules below do the following:
1.
2.
EMPLOYEE_CURSOR Rule

 
EMPLOYEE_CURSOR;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ FORALL EMPLOYEE : | 1
_ EMPLOYEE_DATA.* = EMPLOYEE.*; |
_ INSERT EMPLOYEE_DATA('EMPLOYEE_SCR'); |
_ END; |
_ FCNKEY_SPECS.FCNKEYS = FCNKEY_MSG('EMPLOYEE_SCR'); | 2
_ INSERT FCNKEY_SPECS('EMPLOYEE_SCR'); | 3
_ UNTIL EXIT_DISPLAY DISPLAY EMPLOYEE_SCR: | 4
_ CALL PROCESS_FCNKEY('EMPLOYEE_SCR'); |
_ END; |
_ ------------------------------------------------------------------------

 
Sample Output 1
Executing this rule displays the following screen:

 
Employee Name Employee#
------------- ---------
SMYTHE 80000
ROTERDAM 80002
CHANG 80003
GARZA 80004
TOWNSEND 80014
PASTARINA 80019
CHESSEL 80020
TOWENSEND 80021
NAPIER 80024
CANON 80033
NELSON 81000
CAREY 81001
CHIU 81003
LYNGBAEK 81014
KINGSON 81019
 
FCNKEYS: 3=END 14=EXPAND

 
CURSOR_EXPAND Rule
Positioning the cursor anywhere on the line containing the employee number and pressing PF14 (Expand) invokes the CURSOR_EXPAND rule. This rule uses CURSOROCC_VALUE:

 
CURSOR_EXPAND;
_ LOCAL SELECTED_VALUE;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ SELECTED_VALUE = CURSOROCC_VALUE('EMPLOYEE_SCR', | 1
_ 'EMPLOYEE_DATA', 'EMPNO'); |
_ GET EMPLOYEE WHERE EMPNO = SELECTED_VALUE; | 2
_ CALL DELETESCREENDATA('EMPLOYEE_INFORM'); | 3
_ FCNKEY_SPECS.FCNKEYS = FCNKEY_MSG('EMPLOYEE_INFORM'); | 4
_ INSERT FCNKEY_SPECS('EMPLOYEE_INFORM'); | 5
_ EMPLOYEE_INFO.* = EMPLOYEE.*; | 6
_ INSERT EMPLOYEE_INFO('EMPLOYEE_INFORM'); | 7
_ UNTIL EXIT_DISPLAY DISPLAY EMPLOYEE_INFORM: | 8
_ CALL PROCESS_FCNKEY('EMPLOYEE_INFORM'); |
_ END; |
_ ------------------------------------------------------------------------

 
Sample Output 2
Positioning the cursor on the line of EMPNO 80003 displays EMPLOYEE_INFORM as follows:

 
Employee Information
EMPNO: 80003
LNAME: CHANG
POSITION: Assoc Analyst
MGR# : 83020
DEPTNO: 10
SALARY: 589.00

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved