Skip to main content

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.

For information on transforming values using filters, see Filter List.

Basic Syntax

Any content enclosed in {{ ... }} in a value input field is evaluated as an expression.

Input ExampleEvaluated Result
okFixed string ok
{{ user_name }}Value of variable user_name
{{ count + 1 }}Result of calculating count + 1
{{ status == "ok" }}true or false
note

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.
If you want to set a fixed value, do not wrap it in {{ }}.
  • When not wrapped in {{ }}, the entered value is used as-is.
  • Use this when setting a predetermined value such as a default value.
In variable assignment, you can also use {{ ... }} 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

OperatorExample
=={{ status == "ok" }}
!={{ count != 0 }}
> / < / >= / <={{ score >= 80 }}

Logical Operators

OperatorExample
&&{{ score >= 80 && isActive }}
||{{ status == "ok" || status == "pending" }}
!{{ !isDeleted }}

Contains Operator

OperatorExample
in{{ item in items }}

Type Evaluation in Conditional Expressions

The result of evaluating a conditional expression is handled as follows depending on the type.

TypeValues that become trueValues that become false
booltruefalse
string"true", "1""false", "0"
int, doubleAny value other than 00
Other-Runtime error

Examples

ExpressionResult
{{ true }}true
{{ "1" }}, {{ "true" }}true
{{ 0 }}, {{ "false" }}false
{{ -1 }}true

Common Mistakes

Incorrect ExampleProblemCorrected Example
value > 0Not evaluated as an expression because {{ }} is missing{{ value > 0 }}
{{ ok }}Intended as a fixed string but treated as a variable referenceok
{{ 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.

If you use the same name as a reserved word

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