How to Write Value Input Fields
This page describes the basic syntax, operators, and type handling used in workflow value input fields.
It serves as a reference covering everything from how to use {{ ... }} notation to type evaluation in conditional expressions and common mistakes.
Basic Syntax
Any content enclosed in {{ ... }} in a value input field is evaluated as an expression.
| Input Example | Evaluated Result |
|---|---|
ok | Fixed string ok |
{{ user_name }} | Value of variable user_name |
{{ count + 1 }} | Result of calculating count + 1 |
{{ status == "ok" }} | true or false |
When entering a value, first decide whether you want to "enter a fixed value as-is" or "use the result of an evaluated expression."
- Fixed value: Enter it directly without wrapping.
- Variable reference, calculation, comparison, or transformation: Use
{{ ... }}. - Conditional expression: Write it in a form that evaluates to true / false.
- Variable assignment: You can also use
{{ ... }}in the key name.
{{ }}.- When not wrapped in
{{ }}, the entered value is used as-is. - Use this when setting a predetermined value such as a default value.
{{ ... }} in the key name.If the key name is result_{{ index }} and index is 2, the actual key name becomes result_2.
Example) With the following variable assignment where index = 2 and score = 80, result_2 = 90 is saved.
- Key name:
result_{{ index }} - Value:
{{ score + 10 }}
By dynamically changing the key name, you can more easily handle repetitive processing and sequential numbered storage.
Operators
Comparison Operators
| Operator | Example |
|---|---|
== | {{ status == "ok" }} |
!= | {{ count != 0 }} |
> / < / >= / <= | {{ score >= 80 }} |
Logical Operators
| Operator | Example |
|---|---|
&& | {{ score >= 80 && isActive }} |
|| | {{ status == "ok" || status == "pending" }} |
! | {{ !isDeleted }} |
Contains Operator
| Operator | Example |
|---|---|
in | {{ item in items }} |
Type Evaluation in Conditional Expressions
The result of evaluating a conditional expression is handled as follows depending on the type.
| Type | Values that become true | Values that become false |
|---|---|---|
bool | true | false |
string | "true", "1" | "false", "0" |
int, double | Any value other than 0 | 0 |
| Other | - | Runtime error |
Examples
| Expression | Result |
|---|---|
{{ true }} | true |
{{ "1" }}, {{ "true" }} | true |
{{ 0 }}, {{ "false" }} | false |
{{ -1 }} | true |
Common Mistakes
| Incorrect Example | Problem | Corrected Example |
|---|---|---|
value > 0 | Not evaluated as an expression because {{ }} is missing | {{ value > 0 }} |
{{ ok }} | Intended as a fixed string but treated as a variable reference | ok |
{{ count > "10" }} | Comparing a number with a string produces unintended results | {{ count > 10 }} |
Reserved Words
Reserved words used in Agentiqs are used to control template and field processing, and therefore cannot be used as user-defined field names, variable names, replacement key names, or similar identifiers.
A template parse error may occur, or the value may not be recognized as intended.
List of Reserved Words
break
capture
case
continue
do
else
end
false
for
func
if
import
in
null
readonly
ret
tablerow
this
true
when
while
with
wrap