The variable selector provides a list of variables that you can select and insert into conditions, actions, and tokens.
The variable selector allows for the use of dynamic variable expansion in conditions, actions, and tokens. It is used when the writer of the DirXML script doesn’t know what value to enter during the design phase, and wants the value to be populated dynamically when the code is run (for local variables) or when the driver starts (for global variables). Dynamic variables are not used when the policy needs to refer directly to the variable itself. Instead, they are used when the policy needs to refer to the value of the variable.
Many actions support dynamic variable expansion in their attributes or content. Where supported, an embedded reference of the form $variable-name$ is replaced with the value of the local variable with the given name. An embedded reference of the form is replaced with the value of the global variable name. $variable-name$ and must be legal variable names. For information on what constitutes a legal XML name, see W3C Extensible Markup Language (XML).
If the given variable does not exist, the reference is replaced with the empty string. Where it is desirable to use a single $ and not have it interpreted as a variable reference, use an additional $ as an escape character (for example, You owe me $$100.00).
NOTE:If the global variable doesn’t exist on the driver or driver set, the driver does not start.
In the Policy Builder, double-click the
tab.For instructions on accessing the Policy Builder, see Section 3.1, Accessing the Policy Builder.
Select one of the following conditions:
Click the
icon next to the field where you want to insert a dynamic variable.Select the variable, then click
.Or, for conditions that don’t bring up the
icon:Select one of the following operators:
Equal
Greater than
Less than
Not equal
Not greater than
Not less than
Click the
icon next to the field where you want to insert the dynamic variable.Select the variable, then click
.In the Policy Builder, double-click the
tab.For instructions on accessing the Policy Builder, see Section 3.1, Accessing the Policy Builder.
In the
field, select one of the following options:Click the
icon next to the field where you want to insert the dynamic variable.Select the variable, then click
.In the Argument Builder, select one of the following noun tokens from the
section:Or, select one of the following verb tokens from the
section:Click the
icon next to the field where you want to insert the dynamic variable.Select the variable, then click
.Instead of using the DirXMLScript engine to perform the variable expansion, as is the case with most variable expansion, XPath uses built in XPath functionality and the XSLT processor to do the variable expansion.
For conditions, actions, and tokens that contain XPath expressions, a single $ sign at the beginning of the policy denotes a dynamic variable, which is displayed in the
field. This is also true for the XPath token in the Argument Builder, and for all actions that contain XPath. This is because in order to maintain valid XPath, only one $ sign can be used.The following procedure gives an example of using the variable selector with XPath expressions:
In the Policy Builder, click the
tab.In the
field, select the option.After the
field, click the icon.Select an item and click
.Only one $ sign is displayed before the policy.