Previous Topic: Variable DeclarationNext Topic: Reuse Variables


Variable Assignment

To assign values to dataset variables, use the = assignment operator. The variable assignment uses the following syntax:

[dataset_reference.]variable_name = expression;

The expression consists of any combination of functions, variables, values, and operators that returns a string or integer value. For example:

Process.S = "ABCDEF" + '_' + "123"
Datasets[“ThisDataset”].x = 18 * I
x = 18 * I

If you omit the dataset reference, JavaScript references the process dataset by default. If the variable does not exist in the process dataset, JavaScript creates a temporary variable. To create a process dataset variable, use the Process reference.