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


Chapter 3 Tools : PARMVALUE

PARMVALUE
Returns the value of the parameter from the table that was accessed when the trigger or validation rule was activated. (F)
Invocation
value = PARMVALUE(parmname)
 
On return, contains the value of the parameter. Its syntax can be either C (fixed-length character string) or V (variable-length character string).
Usage Notes
See Also
TIBCO Object Service Broker Managing Data for information about event rules.

Exceptions
 
Raised if an event-driven rule is not being run or the parameter named is not defined as a parameter for the triggering table.
Example
The following validation rule checks the updated values for the field EMPNO in the EMPLOYEE_DEPT parameterized table and returns the parameter value if the update fails:

 
PARMVALUE_1;
_ LOCAL VALUE;
---------------------------------------------------------------------
_ PARMVALUE ('DEPTNO') ¬= 40; | Y N N
_ EMPLOYEE_DEPT.EMPNO <= 90000; | Y N
-------------------------------------------------------+-------------
_ VALUE = PARMVALUE ('DEPTNO'); | 1 1 1
_ RETURN ('FOR DEPTNO '|| VALUE || ' EMPNO MUST | 2
_ BE LESS THAN 90000'); |
_ RETURN ('Y'); | 2 2
---------------------------------------------------------------------

 
Output for the PARMVALUE_1 Rule
Pressing Enter after updating the table with an invalid value returns the following message to the screen:

 
EDITING TABLE : EMPLOYEE_DEPT(40)
COMMAND ==>
EMPNO LNAME POSITION MGR# DEPTNO SALARY
_ ------- ---------------------- -------------- ------- ------ -------
_ 80033 CANON Programmer 90020 40 567.09
_ 81001 CAREY Secretary 81092 40 565.89
_ 81003 CHIU VP 81033 40 865.70
_ 91014 LYNGBAEK Mgr 84021 40 780.67
 
 
 
 
 
 
 
 
 
 
 
 
PFKEYS: 1=HELP 3=END 12=CANCEL 13=PRINT
UPDATE FAILED: FOR DEPTNO 40 EMPNO MUST BE LESS THAN 90000

 

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