Online Manual: "User Management Resource Adminstrator"
Go to: User Management Resource Administrator homepage
Script Action: Map variable
Function
The function maps
the value of an input variable to a value of an output variable. The mapping
table specifies the value of the output variable for each possible value
of the input variable.
Deployment
This script action is usually used in a scripts to handle the case of
exceptions to the main rule of the script. The
output variable can also be used as a label, .e.g. as the target of a GOTO action.
Example: A particular script that creates a user account uses the variable
%HomeServer% to contain the home server of the new account. This name
is later in the script used to specify the home directory of the user:
%HomeDirectory%=%HomeServer%\users\%UserName%
by means of the set
variable script action.
Now this setting works fine for most home servers in your network, but
for a particular server, the location where the home directory should
be created is different: For your home server named OAK you want the home directory of the user
to be %HomeServer%\students\%UserName%
In the above case, you can use the map
variable action. You specify the variable %HomeServer% to be the
input variable, and the variable
%HomeDirectory% as the output variable.
In the mapping table you specify OAK
as the input value to match and %HomeServer%\students\%UserName%
as the associated value. The result is that whenever the home server is
OAK the name of the home directory
is changed from %HomeServer%\users\%UserName%
to %HomeServer%\students\\%UserName%.
Properties
|
Property Name |
Description |
Typical setting |
Remarks |
|
Input variable |
The name of the variable that contains the
information that must be looked up in the list |
|
The Name of the variable must be enclosed
in "%" characters. e.g. %Domain%. |
|
Output variable |
The name of the variable that is modified
by this script action |
|
The Name of the variable must be enclosed
in "%" characters. e.g. %Domain%. |
|
Number of Input-Output values |
The number of entries in the Mapping table |
|
This is only shown in the property list, not in the configuration dialog.
|
|
Mapping Table |
Specifies which input value
results in the specified output
value |
|
Specifies a list of (input value,
output value) pairs. If the contents
of the input variable matches
the input value in the list, the
output variable will be set to
the corresponding output value.
This is only shown in the configuration dialog,
not in the properties list itself. |
|
Set output
variable to default value if no match found. |
If set to Yes, then, when no match is found
in the mapping table, the output variable
is to the below specified default value. If set to NO, and no match if
found, the output variable is
not altered. |
|
|
|
Default value of output
variable |
Specifies the value the output variable gets
when there is no match |
|
This value is only used when the "Set
output variable to default value
if no match found" flag is set to Yes. |
|
Case sensitive compare |
Specifies if the compare function to find
a match must be case sensitive |
No |
|
More information:
Principle of operation
Project operations - Input data
Project operations - Manage script actions
Project operations - Variables
Help on help
|