|
Tag: SetVar
The action SetVar will let you assign a value to a variable or, in the case of a few "reserved" values, call specific value types on demand.
<SetVar Expres1="Help" Expres2="Page"/>
<echo value="{%Expres1%}, {%Expres2%} {%date%}"/>
| Note | Variables are NOT case sensitive. |
Tag Attributes
| Attribute Name | Compatible Attribute Values | Value Description | Comment |
| (name) | User definable | Any unreserved variable name | Mandatory |
| (value) | User definable | Any string or number | Mandatory |
Reserved Variable Values
| Variable Name | Description |  | Comment |
| Date | Current date |  |  |
| Time | Current time |  |  |
| LoopIndex | Current Loop iteration index |  |  |
| ListSize | Current Loop size |  |  |
| ListName | List in current loop processing |  |  |
| ListAction | Action used in current loop |  |  |
| ListParam=X | Value of parameter of corresponding List entry |  |  |
| CurFilePath | File folder containing the current automation script |  |  |
Detailed Description
In the script below, a List action is employed. (For more information regarding Lists, see this page.)

In the script above, a List named "MyList" is defined and comprises the databases "Mailtestcopy.nsf", "Mailtest2.nsf", "Mailtest.nsf", and "test.nsf". Because Echo is set to "false", only the Echo text specified in applicable script lines will show in the console. Within the 5 SetVar action lines that follow, there are 9 variables set: 2 that use reserved values, 6 whose values are set outright, and 1 whose value is another variable. A Loop action is triggered on the List named "MyList", and for each iteration of the Loop block the resulting Echo text will be shown in the console. Note the usage of reserved values within the Echo text itself.
|
|