Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 3 Tools : EVENTTABLE

EVENTTABLE
Returns the name of the table that activated the current derived field rule, trigger rule, or validation rule. (F)
Invocation
string = EVENTTABLE
 
On return, contains the name of the table that activated the current derived field rule, trigger rule, or validation rule. Its syntax is C (fixed-length character string) with length 16.
Used within a validation rule. Its syntax is C (fixed-length character string) with length 16.
Usage Notes
Example
The following validation rule uses EVENTTABLE:

 
EVENTTABLE_1;
_
_ ------------------------------------------------------------------------
_ EMPLOYEE_DATA.EMPNO < 1111; | Y N N
_ EMPLOYEE_DATA.EMPNO > 12000; | Y N
_ ------------------------------------------------------------+-----------
_ CALL SETHILIGHT (EVENTSCREEN, EVENTTABLE, 'EMPNO' , 'Y'); | 1 1
_ CALL SETCURSOR (EVENTSCREEN, EVENTTABLE, 'EMPNO'); | 2 2
_ RETURN ('EMPNO CANNOT BE LESS THAN 1111'); | 3
_ RETURN ('EMPNO CANNOT BE MORE THAN 12000'); | 3
_ RETURN ('Y'); | 1
_ ------------------------------------------------------------------------

 
Resulting Output
When an invalid value of 12003 is entered into the EMPNO field in the screen table EMPLOYEE_DATA, the output appears as follows:

 
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 120003
 
EMPNO CANNOT EXCEED 12000

 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved