Dynamic selection using aliases > Script alias

Script alias
A script alias consists of a key, a script, and an alias variable.
Key
The key is used in the script conditions. You can use a field reference (&fieldname) or a variable ($variable) as key.
Script
In the script, you use the key to specify conditions for when to select a specific alternative. A connector selection example is shown below:
//Select the appropriate output connector
if(&countryCode = "SWE")
{
   $connector = "spoolSWE";
}
if(&countryCode = "FIN")
{
   $connector = "spoolFIN";
}
Alias variable
The alias variable is the variable you use when you set the alias in the Design Center user interface. The value of this variable is set by the script. In the script above, $connector is the alias variable.
Note that the alias variable must be a variable ($variable). It must not be a field reference (&fieldname).
Setting a script alias
To set a script alias for a feature, you select the alias type Variable and specify an alias variable. The figure below shows the Connector Selection Method dialog box where you use the alias variable $connector to select the appropriate output connector.Click to enlarge
Figure 64
OpenText StreamServe 5.6 Updated: 2013-03-01