Variables
Last updated
Was this helpful?
Last updated
Was this helpful?
Select a cell/range of cells > go to the Formulas tab > Defined Names > Name Manager (or hold Ctrl+F3
) and assign a name to the selected cell. In the future, you can refer to the value of the cell/cells by typing the chosen name.
Right-click in the Data Window > Create Parameter. In the popup, provide a parameter name and specify (a) the data type for the values it will accept, (b) the current value, and (c) input options.
Use the Parameter Control tool (in the Input palette), which acts as the input for each iteration of a Batch Macro and will appear as a ¿
on the macro tool icon.
NB. The Control Parameter must have an Action associated with it, such as Update Value, Update Input, or Update Output Actions. For each record coming into the Control Parameter input, the entire macro will be re-configured and run beginning to end.
var ‹variable_name› = ‹expression›
NB. Consider the different uses of the =
symbol. In this case:
a = 2
assigns the value '2' to the variable 'a'
a == 2
tests the equality of 'a', ie returns 'True' if 'a' equals '2'
a === 2
tests the identity of 'a', which in this case will return 'False' because, although 'a' and '2' have the same value, they are different entities.
~DECLARE!~ ‹parameter_name› «type» ~SET!~ ‹parameter_name› = ‹expression›
‹variable_name› = ‹expression›