This page covers variables in more detail. The variable naming standard is discussed here, and the ordering is discussed here.
This line type is used to set or change the value of a variable. It begins with a = character to represent an assignment, and is followed by a variable name, and then another = to represent assigning the variable to the remainder of the line. An assignment line is not added to the final output.
The language has three possible variable types:
| true/false | also known as boolean | can be set by a question prompt, or var assignment |
| number |
negative or positive non-floating-point numbers possible range +/- 2 billion |
can be set by a select or number prompt, or var assignment |
| text | text string | can be set by a text prompt, or var assignment |
A variable can be re-defined by an assignment any number of times, but it cannot be re-defined as a different type. The variable name (between the = characters) will be assigned to the result of the rest of the line, which can be a simple assignment or a more complex expression as shown in the examples below.
An assignment may contain 1 or 2 operands. An operand can be either a constant value such as a number, text string, or a true/false value. It can also be a variable name. When 2 operands are present, both cannot be constants. The following operators are supported between 2 operands:
|
Operators, types they can work with, and result type |
|||||
|
can use with → |
number |
true/false |
text |
result type: | |
|
|
add |
× |
|
× |
number or text |
|
|
subtract |
× |
|
|
number |
|
|
multiply |
× |
|
|
number |
|
|
divide |
× |
|
|
number |
|
|
less than |
× |
|
|
true/false |
|
|
greater than |
× |
|
|
true/false |
|
|
equality test |
× |
× |
× |
true/false |
|
|
non-equality test |
× |
× |
× |
true/false |
|
|
and |
|
× |
|
true/false |
|
|
or |
|
× |
|
true/false |
|
|
negate the operand* |
|
× |
|
true/false |
*The ! character is the only one that can be used with both 1 or 2 operands
|
Examples |
|
= varOne = -33 |
Set variable to a number value |
= varOne = true |
Set variable to a true/false value |
= varOne = varTwo |
Copy the value from one variable and assign to another |
= varOne = !varTwo |
Negate value of a variable and assign the true/false result. |
= varOne = "Description" |
Assign a text string |
= varOne = "A Label and $varTwo" |
Example of assigning text while also substituting a text variable See the Text Substitution page for more detail |
= varOne = “A Label and ” + varTwo |
Add/concatenate two text strings together |
|
|
Assign true if both operands are equal. Operands can be number or true/false. Assignment is true/false. |
= varOne = varTwo != 1 |
Same as above with ==, except assign true if they are not equal. |
|
|
Assign true if the left operand is less than the right. Operands are of type number. Assignment is type true/false. |
= varOne = varTwo > varThree |
Assign true if the left operand is greater than the right. |
|
|
number mathematical operations. Operands and Assignment result are of type number. |
|
|
Assign true if both operands are true. Operands and Assignment result are of type true/false. |
|
|
Assign true if either operand is true. Operands and Assignment result are of type true/false. |
An assignment that contains a variable in one or both operands is referencing the variable value(s) to determine the assignment result. This reference exposes the list to a possible variable ordering error, which is discussed in the Variable Ordering section of the syntax page.
There are a series of reserved variables that are automatically defined in the software, and evaluated at run time. These variables are not defined by the user, and they cannot be assigned to a new value. They can be used in any variable assignment or conditional, and treated the same as any variable derived from a prompt.
| Reserved Variable | Description |
_user |
The username of the user generating/running the list. This is useful for unique content based on each user, which could be related to their specialty or level of experience. An example assignment: = isJohnDoe = _user == “john_doe” |
_timezone_iana |
All modern web browsers provide the timezone of the user's location. The IANA time zone string is an established standard for this. The location's precise date and time can be derived with this identifier, since time offset, daylight savings, etc. are automatically accounted for. It is important to note that this is the time zone of the mobile device or computer where the user is using clir. It is not the time zone of the cloud server that runs the software service, which may of course be different. This text variable contains the IANA time zone string (e.g. "America/New_York"). |
|
Date Variables |
|
_date_year |
Number value of the current year (e.g. 2025) |
_date_day_of_year |
Number value of the current day into the total number of days in one year (1 – 365, or 366 in a leap year) |
_date_month_num |
Number value of the current month (1 - 12) |
_date_month_name |
Text string of the current month (e.g. “November”) |
_date_day_of_month |
Number value of the current day of the month (1 - 31) |
_date_day_of_week_num |
Number value of the current day of the week (1=Sunday, 2=Monday, ..., 7=Saturday) |
_date_day_of_week_name |
Text string of the current day of the week (e.g. “Thursday”) |
_date_string |
Text string of today's date (e.g. “November 29, 2025”) |
|
Time Variables |
|
_time_hour |
Number value of the current hour (0 - 23) |
_time_minute |
Number value of the current minute (0 - 59) |
_time_minutes_of_day |
Number value of the current number of minutes into the day (0–1439) |
_time_second |
Number value of the current hour (0 - 59) |
_time_string |
Text string of the current time (e.g. "03:17:58 PM") |
_time_string_24 |
Text string of the current time in 24-hour format (e.g. "15:17:58") |