Skip to content

Transform a value without another block

In text fields, helpers are used between {{ and }} to transform, count, filter, or display a value.

Text

HelperExampleResult
uppercase{{uppercase "wikit"}}WIKIT
lowercase{{lowercase "URGENT"}}urgent
capitalize{{capitalize "hello"}}Hello
trim{{trim " hello "}}hello
truncate{{truncate description 80}}First 80 characters
replace{{replace ref "EN-" ""}}EN-1024 becomes 1024
split{{split "a,b,c" ","}}['a', 'b', 'c']
contains{{contains userMessage "urgent"}}true or false

Numbers

HelperExampleResult
add{{add daysTaken 5}}12 + 5 → 17
subtract{{subtract quota daysTaken}}25 - 12 → 13
multiply{{multiply price quantity}}10 × 3 → 30
divide{{divide total 2}}30 ÷ 2 → 15
round{{round 4.7}}5
toInt{{toInt "42.9"}}42
fixed{{fixed 3.14159 2}}3.14

Lists

HelperExampleResult
length{{length documents.body}}Number of items
first{{first results}}First item
last{{last results}}Last item
join{{join tags ", "}}hr, payroll, leave
sort{{sort names}}Sorted list
reverse{{reverse history}}Reversed list
slice{{slice results 0 3}}First three items
isEmpty{{isEmpty documents.body}}true when empty

Objects

HelperExampleResult
get{{get user "email"}}Value of email
keys{{keys response.body}}Property names
values{{values response.body}}Object values
json{{json user}}Object displayed as JSON
parseJson{{parseJson "[1, 2, 3]"}}Text converted into a list
merge{{merge profile preferences}}Merged objects

Conditions

HelperExampleResult
eqeq status "open"True when equal
nene status "closed"True when different
gt / gtegte score 70Greater than, optionally equal
lt / ltelt attempts 3Lower than, optionally equal
and / or / notand (gte score 70) (not vip)Logical combination
matchmatch email "@wikit\\.ai$"Regex match
isEmptyisEmpty documents.bodyTrue when empty or absent

Condition Expression field

Write gte score 70 directly, without {{ or }}. Braces are only used in text fields.

Debugging and conversion

HelperExampleResult
codeblock{{codeblock documents.body}}Formatted debug value
concat{{concat firstName " " lastName}}Jane Doe
toQueryString{{toQueryString filters}}?status=open&page=2
toJson{{toJson request}}Object serialized for an HTTP body

Remove codeblock displays before publication when they might contain secrets or personal data.