Skip to main content

When to Use Conditions

Use conditions when your training should respond differently to the same event depending on circumstances. Examples:
  • Score-based branching: If learner scores >= 80%, show “Congratulations!”. Otherwise, show “Try Again”.
  • Choice-based branching: If learner selects “Door A”, go to “Safe Path”. If they select “Door B”, go to “Trap”.
  • Attempt limiting: If attempts < 3, let them retry. If attempts >= 3, show failure screen.
  • State tracking: If a tracking variable like safetyTrainingComplete is true, show advanced content. Otherwise, show basics.

Building a Condition

Conditions use variables and operators to create logical expressions. You write conditions directly in the Conditions field of a transition using AXL syntax.
Transition panel showing Conditions field with 'Score > 60' expression, Insert Variables section, and Destination Step

Condition builder — write expressions like 'Score > 60' directly in the Conditions field

1

Open a transition in the Properties panel

Click on a transition to expand it. You’ll see Events, Conditions, and Actions sections.
2

Expand the Conditions section

Click the Conditions dropdown to reveal the expression field.
3

Write your condition expression

Enter an AXL expression (e.g., Score > 60). Use the Insert Variables section to reference available variables.
4

Set the Destination Step

Choose where the learner goes when this condition is true.

Operators

Your condition can use these operators:

Logical Operators: &&, ||, !

Combine multiple conditions for complex logic. AXL uses symbol operators only — there are no AND, OR, or NOT keywords.
  • && (AND): Both conditions must be true
  • || (OR): Either condition can be true
  • ! (NOT): Inverts a condition

Examples

Grouping with Parentheses

For complex logic, use parentheses to control the order:

Altoura Expression Language (AXL)

Conditions use Altoura Expression Language (AXL) — a simple expression syntax for building rules. AXL is read-only: you cannot assign values inside an expression. To update a variable, use the Set Variable action and put the AXL expression in its value field.

Arithmetic in Expressions

Arithmetic appears inside a condition or as the value of a Set Variable action:
In a Set Variable action, the new value is itself an AXL expression — for example, set score to score + 10.

Comparisons

Logical Operations

Ternary Operator (if-then-else)

Built-in Functions

AXL provides useful functions:

Example Expressions

To clamp a value, use clamp(...) inside a Set Variable action — for example, set finalScore to clamp(rawScore, 0, 100).

Event Data in Transition Conditions

Inside a transition’s condition, you can reference data that came in with the event using event.data.* and event.target.*:
These references are only valid in transition conditions where an event triggered the evaluation.

System Variables (Read-Only)

Your training has access to system variables provided automatically by Altoura. These are read-only — you cannot change them, but you can read and use them in conditions. Example uses:

Transition Priority and Multiple Conditions

When multiple transitions exist for the same event, the Creator App checks them in order (top to bottom, or as defined in your UI). The first transition whose condition is true fires. Example: Multiple choice paths From state “Quiz Question”, you have three transitions on a Choice event:
  1. If selectedAnswer == "optionA", go to “Correct”
  2. If selectedAnswer == "optionB", go to “Incorrect”
  3. No condition (default fallback), go to “Unexpected Answer”
When the learner chooses an option:
  • If they picked option A, condition 1 is true → transition to “Correct” fires
  • If they picked option B, condition 1 is false, condition 2 is true → transition to “Incorrect” fires
  • Any other choice → condition 1 and 2 are false → fallback transition fires

Unconditional Fallback Transitions

A transition with no condition always fires. Use this as a default or “else” path. Best practice: Place your most specific conditions first, then add an unconditional fallback at the end to catch anything unexpected.

Testing Your Conditions

Before launching your training:
Use the Preview feature in the Creator App to test your branches. Set variable values manually and verify that the right transitions fire.
Make sure every condition-based path leads somewhere and works as expected.
Test boundary values (e.g., exactly 80 when the condition is >= 80).
Make sure unconditional transitions work if learners do something unexpected.
If you use &&/|| logic, test all combinations.

Next Steps

Learn how to: