Conditions can be attached to Actions, and are used to dictate whether or not a particular Action should be executed. If a Condition asserts as true, the Action the Condition is attached to will execute. If not, the Program will ignore this Action, and the next Action is considered instead.

Conditions are optional; if they are omitted, the actions are always executed. 

There are a number of different operators you can use to construct your conditional statements, which are as follows:

 

Conditions attached to an Action will fill an empty Variable field with the user's response to the current Dialog. This is useful for avoiding having to save a Variable for values that only need to be checked in the current Dialog. This can be used to check things like which Multiple Choice option was selected, or which value was chosen from a Number Slider.

 

Equals: The action will be executed if the Variable and value fields are the same.

  • (Variable with value ‘1’) Equals (value ‘1’): Asserts as True.

  • (Variable with value ‘abc’) Equals (value ‘abc’): Asserts as True.

  • (Variable with value ‘1’) Equals (value ‘one’): Asserts as False.

Back to top

Not Equals: The action will be executed if the Variable and value fields are not the same.

  • (Variable with value ‘2’) Not Equals (value ‘2’): Asserts as False.

  • (Variable with value ‘def’) Not Equals (value ‘def’): Asserts as False.

  • (Variable with value ‘2’) Not Equals (value ‘two’): Asserts as True.

Back to top

Contains: The action will be executed if the Value is an element in an array Variable, or otherwise, if the Value as a string is a component of the Variable as a string.

  • (Variable with value ‘hello world’) Contains (value ‘hello’): Asserts as True.

  • (Variable with value ‘789’) Contains (value ‘78’): Asserts as True.

  • (Variable with value ‘hello’) Contains (value ‘hello world’): Asserts as False.

Back to top

Does Not Contain: The action will be executed if the Value is not an element of an array Variable, or otherwise, if the Value as a string is not a component of the Variable as a string.

  • (Variable with value ‘banana stand’) Does Not Contain (value ‘money’): Asserts as True.

  • (Variable with value ‘12345’) Does Not Contain (value ‘234’): Asserts as False.

  • (Variable with value ‘hello’) Does Not Contain (value ‘hello world’): Asserts as True.

Back to top

Has Any Value: The action will execute if a given Expression is not null. It is useful for checking whether a Variable has been initialised at this point in the Conversation.

Back to top

Has No Value: The action will execute if a given Expression is null. It is most commonly used to execute an action only when a Variable has not yet been initialised.

Back to top

Less Than/Before: The action will execute if the Value is smaller than, or earlier than, the Variable. It is intended for use with numerical values and date/time values.

  • (Variable with value ‘5’) Less Than/Before (value ‘6’): Asserts as True.

  • (Variable with value ‘2’) Less Than/Before (value ‘2’): Asserts as False.

  • (Variable with value ‘[now]’) Less Than/Before (value ‘[startofday]’): Asserts as False.

Back to top

Not Less Than/Before: The action will execute if the Value is not smaller than the Variable. So the action will execute if the Value is equal to, or larger than, the Variable. It is intended for use with numerical values and date/time values.

  • (Variable with value ‘5’) Not Less Than/Before (value ‘5’): Asserts as True.

  • (Variable with value ‘1’) Not Less Than/Before (value ‘2’): Asserts as False.

  • (Variable with value ‘[now]’) Not Less Than/Before (value ‘[startofday]’): Asserts as True.

Back to top

Greater Than/After: The action will execute if the Value is greater than, or after, the Variable. It is intended for use with numerical values and date/time values.

  • (Variable with value ‘5.00001’) Greater Than/After (value ‘5’): Asserts as True.

  • (Variable with value ‘0’) Greater Than/After (value ‘1’): Asserts as False.

  • (Variable with value ‘[now]’) Greater Than/After (value ‘[startofday]’): Asserts as True.

Back to top

Not Greater Than/After: The action will execute if the Value is not greater than the Variable. So the action will execute if the Value is equal to, or smaller than, the Variable. It is intended for use with numerical values and date/time values.

  • (Variable with value ‘4’) Not Greater Than/After (value ‘5’): Asserts as True.
  • (Variable with value ‘1’) Not Greater Than/After (value ‘1’): Asserts as True.
  • (Variable with value ‘800’) Not Greater Than/After (value ‘8’): Asserts as False.

Back to top

All True: This action will only execute if all the provided conditions are satisfied. While it initially only provides two sub-Condition fields, more can be added by selecting the Add Condition button. Additionally, All True Conditions can be nested with other types of Conditions, allowing for complex structuring of Conditional statements.

Back to top

At Least 1 True: This action will execute if any of the provided conditions are satisfied. While it initially only provides two sub-Condition fields, more can be added by selecting the Add Condition button. Additionally, Conditions can be nested within others, allowing for complex structuring of Conditional statements.

Back to top

All False: This action will only execute if all the provided conditions are not satisfied.  While it initially only provides two sub-Condition fields, more can be added by selecting the Add Condition button. Additionally, All False Conditions can be nested with other types of Conditions, allowing for complex structuring of Conditional statements.

Back to top

At Least 1 False: This action will execute if any of the provided conditions are not satisfied. While it initially only provides two sub-Condition fields, more can be added by selecting the Add Condition button. Additionally, Conditions can be nested within others, allowing for complex structuring of Conditional statements.

Back to top

Custom Conditions: This Condition allows for NCalc expressions to be entered into the Expression field, and will assert as true if the NCalc expression contained within asserts as true. Click here for information on writing NCalc expressions.