Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Executing code based on a condition can be performed using if and if / else statements.

If Statement Syntax (den = Data Export NameVarCode = Variable Code)

if (#den1 #VarCode1 == 0) {
   #den2    #VarCode2 = 1;
   Other statements here...
}

If - Else Statement Syntax (den = Data Export Name)

if (#den1 #VarCode1 == 0) {
   #den2    #VarCode2 = 1;
} else if (#den1 #VarCode1 == 1) {
   #den2    #VarCode2 = 2;
} else if (#den1 #VarCode1 == 2) {
   #den2    #VarCode2 = 3;
} else {
   #den2    #VarCode2 = 0;
}

Functions are defined on the "Variable Dependencies" tab (see image). The standard way to set up functions is:

...