Setting a variable’s value
Once you have created a variable you can also set its initial value. This is the value that the variable will have at the start of execution of any scenario instance before it is modified by the user or by an action in a rule.
You may have noticed that a default value is always displayed in the value cell. By default a variable is set to be Auto-Typed, and initially set to be of Text type with the empty string as its value — "".
You can change the initial value by clicking on the value cell for the particular variable, and then typing in the appropriate value, or else double clicking on the cell to get a text entry cursor. The former method over-writes any previous value; while the latter technique lets you edit the existing value.
If the variable is set to be Auto-Typed, you can type in any value. The variable’s type will then be deduced, and may therefore be changed, by what you have typed in.
If you type any whole number (for example, 5, 25, -145) the variable will be set to Number, with the constraint Whole number. If you supply a number with a fractional part (4.45, .68456, -23.), the variable will be set to be a Number with no constraints. If you enter one of true or false (any mixture of case will work, for example, TRUE, True, tRue), the variable will be assumed to be of True/False (conditional) type. Everything else is taken to imply a Text variable.
If the variable is not Auto-Typed, you are only allowed to enter values that are valid according to the type of the variable and any constraints imposed on it. So, for example, if the variable is of Number type, you cannot enter “Hello” as a valid value. If you attempt to do so, the variable’s value will be reset to the previously set value, or the default for that type if none had been set, that is 0 or 0.0.
Copyright © 2013
Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.