About Wizlink®

Variables

The blue Variables bar is at the bottom of main application screen. Click on the word Variables and it opens up a place where you may create all variables needed (in IT language it is called: declare variables). Click on greyish text Create Variable and in opened textbox write the name. Then you can choose a type of variable from a drop-down list in a column Variable type (default is string). In Default column set the value of your variable (or leave place empty when needed). In Scope column assign the variable to specified part of the scenario. Variable assigned to e.g. Alternative Scenario Flowchart will be visible only in this part of the scenario. In Modifiers (in properties window to the right) are two options: ReadOnly and Mapped. When you tick ReadOnly – the value of your variable cannot be changed (e.g. by activity Assign Variable), when you tick Mapped - the variable is mapped for persistence.

If something goes wrong and you want to get rid of your variable – simply pick that variable by clicking it, then right-click the same place and choose Delete from the right-click menu.

Other method: right-clicking on an activity and selecting "Create Variable" from the appearing menu will move the cursor directly to the variables bar.

 

NOTE: choose carefully name of your variable, make the name be relatively descriptive of its use. Remember that maybe another person will use your scenario (or even you come to look at the scenario at a later date), so make it as much comprehensible as you can.

NOTE: a variable name cannot start with a number, nor can it contain spaces (however underscores are allowed). Special symbols are not allowed. Apart from that, you can use any mix of upper- and lowercase alphanumeric characters. There are some words which you may not use as names for variables as they have special meaning in application (e.g. byte, double, false, true, int, operator, public, error).

NOTE: during running a scenario you can’t change or remove any variable used in scenario. In fact: you can make changes inside the Variable bar (remove letters, write letters, change type etc.), but it has no effect whatsoever to the running scenario and such changes are restored to the previous state immediately after the end of the scenario.

NOTE: every variable should get a unique name. However you can have variables with the same name declared to different scopes of the application. In such a case you will get warning that variable "is already declared". Be extremely cautious in such cases (especially when copying a group of activities/sequence(s) with change of scope), as it leads to potential problems.

var_warning2

NOTE: when declaring an array you should initialize it at once. You can do this by defining how many values the array can hold. The array xxx in a picture below is of length 12 (can hold 12 elements). You can also create and initialize an array by naming its values, if you already know the values you want to store in the array at the moment of declaring (an array yyy holds 5 elements). Remember that once the array's length has been defined, it cannot be changed.

var_array03