Substitutions allow you to build open-ended displays in which data attachments and commands depend on values defined at the time the display is run. In this way, a single display can be reused to show data and execute commands from a number of different sources. When data attachments are created in the Display Builder, generic values are used instead of the actual value of any field in the Attach To Data and Define Command dialogs. Later when the display is running, these generic values are defined. Substitution values can either be defined for all displays or for a single drill down display.
To specify a value for substitution, select Tools>Options. Click the Substitutions tab to add, remove or edit substitution values. These values are inherited by drill down displays. Substitutions specified in the “Application Options Dialog” can be saved to OPTIONS.ini. For more information on how to use the Application Options dialog to specify substitutions, see “Application Options”.
Note: The substitution string $value is reserved for internal use.
Note: Substitution strings cannot contain the following:
: | . tab space , ; = < > ' " & / \ { } [ ] ( )
Linking Substitutions with Variables
Substitutions can also be set by adding or editing variables. To link a variable with a substitution by the same name, select Use As Substitution when creating a variable. If no substitution by that name exists, one will be created and given the value of the variable. If a substitution by that name already exists, the variable will assume the value of the substitution instead of the value entered in the Initial Value field. Whenever the value of the variable is updated, the associated substitution will also be updated and when the substitution is updated the associated variable will update. The Use As Substitution feature is not available when editing existing variables. See “Add/Edit Variables” for more information.
Note: If you create a variable in the Attach to Variable Data dialog and it begins with a $, the variable will be linked to a substitution with the same name.
The ability to specify substitutions for drill down displays allows you to design a multi-level hierarchy of parameterized displays. To specify a substitution value for a drill down display, right-click on the source object in the main display and select Object Properties. In the Object Properties window, double-click on drillDownTarget in the Property Name field to open the “Drill Down Properties” dialog.
Some substitutions are automatically set on drill down displays that are activated from an object that displays tabular data (i.e., table or graph). The data attachment for the source object is used to create substitutions that will be passed into the drill down display. The row which corresponds to the selected element in the source object (i.e., cell, object, bar, or wedge) will be used to construct the substitution when the drill down is activated. Which substitutions are set on the drill down display depends on the data attachment of the source object. To customize which substitutions will be passed into drill down displays, double-click on drillDownColumnSubs in the Object Properties window to open the “Drill Down Column Substitutions Dialog”.
For information on Substitutions for your data source, refer to the “RTView Data Sources” section of this documentation.
Data Source |
Substitution Value |
Definition |
The following substitutions will be set no matter what data source is attached: |
$col1 |
Data from first cell in selected row or object. Note: Substitutions set for drillDownColumnSubs will be used instead of $col1. |
$celldata |
Data from selected cell. In an Object Grid this value will return the same data $col1. |
|
$colName |
Name of the selected column. |
|
If the source object is attached to Function data, the following substitutions will be set: |
$XrowName (where X is the # of the rowname) |
Data from a selected row or object. A substitution is defined for each part of the rowname. For example, if the rowname was plant1:load:station7:machine8 the substitutions would be: $1rowName:plant1 $2rowName:load $3rowName:station7 $4rowName:machine8 |
$filterfield |
Filter field name from the selected row or object. |
|
$filtervalue |
Filter field value from the selected row or object. |
For more information on objects that display tabular data, see the “Table Objects” and “Graph Objects” sections. To learn more about setting drill down targets, open the display file drilldown.rtv (located in demos/tutorials) for an example of the different ways drill down targets can be utilized in a display.