Using Advanced Expression Piping (AEP) you can perform both simple and complex expressions. This article will walk through the available operators you can use for some of your simpler expressions and outline where they can be used in more complex expressions as well.
Whether you are simply adding two fields together or looking to compare different values to each other, Advance Expression Piping (AEP) will almost always use an operator to perform the specific action.
Simple Expressions
Simple Expressions can be used in the case that we simply want to find the result of two or more values using the same operator. They are meant to be straight forward expressions such as: {{ q1+q2 }} or {{ q1*q2*q3 }}.
These types of values do not require any additional functions to be added. However, simple expressions do not allow for multiple operators to be performed within a single expression.
For example, {{ (q1+q2)*q3 }} is not a possible simple expression and is considered a complex expression (below).
Complex Expressions
More complex expressions require the use of functions to be added. In the case where you wish to perform multiple operations within a single expression the SUM function will be needed. For example:
{{ SUM(q1+q2)*q3 }}
NOTE: This will be the case for any operator, such as {{ SUM(q3-q4)*q1 }}.
Operator |
Description |
Example Expression |
Example Description |
+ |
Performs addition |
{{ q1 + q2 }} |
Sums the values entered into two questions. |
- |
Performs subtraction |
{{ q3[0] - q3[1] }} |
Subtracts the input in the second cell from the first input. |
* |
Performs multiplication |
{{ q1 * q2 }} |
Multiplies the value entered in q1 by the input of q2. |
/ |
Performs division |
{{ q1 / q2 }} |
Divides the value entered in q1 by the input of q2. |
Operator |
Description |
Example Expression |
Example Description |
not |
Performs Boolean logic and evaluates to true or false |
{{ not (q1 = 3 ) }} |
Evaluates to true unless a 3 is the response for q1. |
and |
Performs Boolean logic and evaluates to true or false |
{{ (q1 > 0) and (q1 < 11) }} |
Evaluates to true when a value between 1 and 10 is the response for q1. |
or |
Performs Boolean logic and evaluates to true or false |
{{ (q1 > 0) or (q1 < 11) }} |
Evaluates to true when q1 is either greater than 0 or if q1 is less than 11. |
Operator |
Description |
Example Expression |
Example Description |
= |
Is equal to. Evaluates to true or false. |
{{ q1 = q2 }} |
Evaluates to true when the input to q1 is the same as the input of q2. |
> |
Is greater than. Evaluates to true or false. |
{{ q1 > q2 }} |
Evaluates to true when the value 0f q1 is greater than the value of q2. |
< |
Is less than. Evaluates to true or false. |
{{ q1 < q2 }} |
Evaluates to true when the value to q1 is less than the value of q2. |
>= |
Is greater than or equal to. Evaluates to true or false. |
{{ q1 >= q2 }} |
Evaluates to true when the value to q1 is greater than or equal to the value of q2. |
<= |
Is less than or equal to. Evaluates to true or false |
{{ q1 <= q2 }} |
Evaluates to true when the value to q1 is less than or equal to the value of q2. |
!= |
Does not equal. Evaluates to true or false. |
{{ q1 != q2 }} |
Evaluates to true when the value to q1 is not equal to the value of q2. |