A boolean expression can have only one of two values: true (yes) or false (no). For example, the expression “Date equal to 07/17/2014” has a value of yes (true) if the current variable’s value is July 17, 2014; otherwise, it has a value of no (false). Use boolean values (or expressions that return boolean values) with If-Then-Else actions to tell  Architect how to make decisions based on two clear alternatives.

Examples

  • Call.Ani==“tel:+13175551212”: In this Boolean expression, the result is true if the originating phone number is 1-317-555-1212; otherwise, false.
  • ToAudioTTS(If(Hour(GetCurrentDateTimeUtc()) >= 12, “Good afternoon”, “Good morning”)): In this expression that includes boolean values, if the current time is on or after 12:00:00 p.m., the system plays “Good afternoon” audio. Otherwise, it plays “Good morning” audio. 
    Note: In this example, the system runs the check against UTC datetime value.

You can test for only one condition with one variable, or you can test for multiple conditions with multiple variables. Each time you click Add update statement, Architect adds a variable row. If the table has more than one row, then:

  • The process evaluates the conditions in top-to-bottom order as they appear in the table.
  • The process uses “short-circuit evaluation.” When an expression combines multiple conditions by using OR, then the whole expression is true if any of the conditions are true. Therefore, if the first condition is true, the process knows that the whole expression is true and doesn’t need to evaluate any of the other conditions. As soon as the process hits a condition that is true, it stops evaluating an OR expression. On the other hand, if an expression combines multiple conditions by using AND, then the whole expression is false if even one of its conditions is false. Therefore, as soon as the process hits a condition that is false, it stops evaluating an AND expression because it knows that the whole expression is false. In either case, the process moves on to the next step.

Add a boolean expression to a task sequence

In a task sequence, you can add a boolean expression to an Update Data data action. For example, 

  1. From the Toolbox, expand the Data category and drag an Update Data action to the desired location in the task.
  2. On the Update Data design form, in the Name field, add a meaningful name to describe the item.
  3. Click the Add update statement button and select Boolean.
  4. In the Variable Name field, type the label to identify the variable on tasks.
  5. In the Value To Assign field, do one of the following:
    • To set the value from literal mode, click the True or False radio button.
    • To set the value using an expression, click the expression button and do one of the following:
      • Add the expression inline.
      • Click the Edit Expression button to open the large expression Editor and build your expression.
  6. To optionally add another variable, click the Add update statement button.