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


Chapter 4 Adding Additional Features to a Screen : Adding Virtual Fields to a Screen Table

Adding Virtual Fields to a Screen Table
Using Virtual Fields
There are two virtual fields contained in each screen table, $MODIFIED and $OCCNUM. There are two ways to use these fields:
Associate these fields with each screen table for use with selection in rules. When used in selection, you cannot order on either of these fields.
Use these fields in a screen table definition. If used in a screen table definition, they act as described in the definition and not as described below.
$MODIFIED Field
$MODIFIED is used to determine which occurrences in a screen table have been modified. $MODIFIED has semantic data type L (logical), syntax C (character), and length 1. It behaves as follows:
Example
The following example shows how $MODIFIED can be used in a rule. It returns all occurrences modified by the user.

 
DISPLAY EMPLOYEE_EXPENSE;
FORALL EXPENSE_DATA (’EMPLOYEE_EXPENSE’) WHERE $MODIFIED = ’Y’:
END;

 
$OCCNUM Field
$OCCNUM returns the current position of an occurrence in a screen table (1 is given as the first position). $OCCNUM has syntax B (binary) and length 4. It positions the screen table buffer on the occurrence where the cursor is positioned.
Example
The following example shows how $OCCNUM can be used. It positions the screen table buffer on the occurrence where the cursor is currently placed.

 
DISPLAY EMPLOYEE_EXPENSE;
GET EXPENSE_DATA (’EMPLOYEE_EXPENSE’)
WHERE $OCCNUM = CURSOROCC# (’EMPLOYEE_EXPENSE’);

 

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