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


Chapter 7 Coding Considerations for Event, Location, and Derived Value Rules : Coding Rules to Derive Values

Coding Rules to Derive Values
Conditions that Apply
If you are using a rule to derive a value for a field, the rule must be a function.
Search Path
The search path is determined by the current search path for the session. Because the Table Editor on the developer’s workbench has a search path of S (system library), when you are accessing the table from the workbench you must execute STEBROWSE to browse, or STE or edit, a table using a derived rule for location.
Sample Definition
The following example illustrates a sample definition for the Src and Sourcename fields in the @EMPLOYEES_SUB table. In this definition, the HIREDATE field has the MODIFY_DISPLAY rule defined to it.

 
Synt Dec Order
Field Name Type Len Key Rqd Default Src Source Name
---------------- - - ---- -- - - - ---------------- - ----------------
_ EMPNO 0 0 P N
_ LNAME 0 0 N
_ POSITION 0 0 N
_ MGR# 0 0 N
_ DEPTNO 0 0 N
_ HIREDATE S C 10 0 N D MODIFY_DISPLAY

 
Sample Source Rule
The following example illustrates the sample source rule. The rule uses the shareable tool $DATE_PIC to modify the display of the employee’s hire date.

 
MODIFY_DISPLAY;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ RETURN($DATE_PIC(’YY MMM DD’, EMPLOYEES.HIREDATE)); | 1
_ ---------------------------------------------------------------------------

 
See Also
TIBCO Object Service Broker Shareable Tools for information about these tools.

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