Appearance
Filters
A filter transforms a value. Write the input first, then |, the filter name, and any arguments:
liquid
{{ process.name | default: "Untitled" | upcase }}This page lists the filters supported in Nawfe's workflow templates. Formula means the filter is also allowed in form logic formulas. Formula expressions must still start with a current field reference, such as {{ fields.name.value | upcase }}; a filter's availability does not allow workflow variables or tags inside a formula.
The reference tables show the input separately from the filter call. For example, input 5 and call plus: 3 mean {{ 5 | plus: 3 }}. Literal inputs make the behavior easy to reproduce in a workflow template.
Defaults and conversion
| Filter call | Input | Result / behavior | Formula |
|---|---|---|---|
default: "Unknown" | "" | Unknown; also replaces missing/null, false, and empty arrays | Yes |
default: true, allow_false: true | false | false; preserves a false boolean | Yes |
to_integer | "12.8" | 12.8; converts to a number, preserving the fraction | No |
json | "Ada" | "Ada", including JSON quotes; also serializes arrays and objects | No |
jsonify | "Ada" | Same as json | No |
inspect | "Ada" | JSON-like inspection output for examining a value | No |
default preserves numeric zero. It does not replace whitespace-only text; put strip before it when spaces should count as missing. json and inspect accept an optional indentation width, such as json: 2. Inspection output is useful while editing a template; remove it before sending content to recipients who should not see the full object.
Numbers
| Filter call | Input | Result / behavior | Formula |
|---|---|---|---|
plus: 3 | 5 | 8 | Yes |
minus: 3 | 5 | 2 | Yes |
times: 3 | 5 | 15 | Yes |
divided_by: 2 | 5 | 2.5 | Yes |
modulo: 3 | 5 | 2, the remainder | Yes |
abs | -5 | 5 | Yes |
at_least: 10 | 5 | 10, enforcing a minimum | Yes |
at_most: 10 | 15 | 10, enforcing a maximum | Yes |
ceil | 2.1 | 3 | Yes |
floor | 2.9 | 2 | Yes |
round: 2 | 2.456 | 2.46; omit the argument to round to a whole number | Yes |
Division keeps fractional results even when both inputs are whole numbers. Add floor, ceil, or round if you need a whole number. Guard a divisor with a rule or condition when it could be zero. Math filters calculate values; they do not format currency or guarantee a fixed number of visible decimal places.
liquid
{{ 100 | plus: 25 | times: 1.1 | round: 2 }}This produces 137.5, not 137.50. Use number_fmt when the result is display text and needs locale-aware formatting.
Text
| Filter call | Input | Result / behavior | Formula |
|---|---|---|---|
append: "!" | "Ready" | Ready! | Yes |
prepend: "REF-" | "123" | REF-123 | Yes |
capitalize | "hELLO WORLD" | Hello world | Yes |
upcase | "Ready" | READY | Yes |
downcase | "Ready" | ready | Yes |
strip | " Ada " | Ada; trims both ends | Yes |
lstrip | " Ada " | Ada ; trims the start | Yes |
rstrip | " Ada " | Ada; trims the end | Yes |
strip_newlines | Text containing line breaks | Removes line breaks | Yes |
remove: "na" | "banana" | ba; removes every match | Yes |
remove_first: "na" | "banana" | bana | Yes |
remove_last: "na" | "banana" | bana | Yes |
replace: "a", "o" | "banana" | bonono | Yes |
replace_first: "a", "o" | "banana" | bonana | Yes |
replace_last: "a", "o" | "banana" | banano | Yes |
split: "," | "red,blue" | Array ["red", "blue"] | Yes |
slice: 1, 3 | "Nawfe" | awf; start index and optional length | Yes |
size | "Nawfe" | 5; also counts array items | Yes |
truncate: 8 | "Hello world" | Hello...; length includes the ending | Yes |
truncatewords: 2 | "one two three" | one two... | Yes |
normalize_whitespace | "one two" | one two; collapses whitespace runs | No |
squish | " one two " | one two; collapses and trims whitespace | No |
number_of_words | "one two three" | 3 | No |
array_to_sentence_string: "and" | ["red", "blue", "green"] | red, blue, and green | No |
truncate and truncatewords accept a custom ending as their second argument, such as truncate: 8, "…". slice also works on arrays and accepts negative indexes to count from the end. The strip filters accept an optional string of characters to trim. Replacements use literal text, not regular expressions.
HTML, URLs, and encoding
| Filter call | Input | Result / behavior | Formula |
|---|---|---|---|
escape | "<b>A&B</b>" | Escapes HTML characters, including angle brackets and ampersands | Yes |
escape_once | "A & B" | Preserves the existing entity rather than escaping it again | Yes |
strip_html | "<b>Ada</b>" | Ada; removes HTML tags | Yes |
newline_to_br | Text containing a line break | Inserts an HTML <br /> for the line break | Yes |
xml_escape | "A&B" | A&B; escapes XML characters | No |
url_encode | "hello world" | hello+world; encodes a URL component, using + for spaces | No |
url_decode | "hello%20world" | hello world | No |
cgi_escape | "hello world" | hello+world; CGI-style component encoding | No |
uri_escape | "hello world" | hello%20world; URI encoding that preserves URI separators | No |
slugify | "Hello World" | hello-world | No |
base64_encode | "hello" | aGVsbG8= | No |
base64_decode | "aGVsbG8=" | hello | No |
sha256 | "hello" | SHA-256 digest as a hexadecimal string | No |
hmac_sha256: "example-key" | "hello" | HMAC-SHA256 digest using the supplied key | No |
Choose escaping for the destination: HTML text, a URL component, and a JSON string need different treatment. HTML filters do not make a form field render HTML if the field is plain text. Base64 is an encoding, not encryption. Use HTTP request credentials and signing settings for integration secrets rather than putting secrets into a template.
slugify accepts an optional mode ("default", "pretty", "ascii", "latin", "raw", or "none") and an optional boolean to preserve case, for example slugify: "ascii", true.
Arrays and object collections
The examples in this section assume these sample values. In a workflow, replace the sample variable with a real array selected from the variable picker.
json
{
"tags": ["red", "blue", "red"],
"other_tags": ["green"],
"numbers": [10, 20, 30],
"values": ["red", null, "blue"],
"rows": [
{ "name": "Ada", "team": "Ops", "amount": 20, "active": true },
{ "name": "Ben", "team": "Sales", "amount": 10, "active": false },
{ "name": "Cy", "team": "Ops", "amount": 30, "active": true }
]
}Arrays and objects shown below describe the returned value. Use json to print that structure, join to make text, or a for tag to render each item.
| Filter call | Input | Result / behavior | Formula |
|---|---|---|---|
first | tags | red | Yes |
last | tags | red | Yes |
join: ", " | tags | red, blue, red | Yes |
size | tags | 3 | Yes |
slice: 1, 1 | tags | ["blue"] | Yes |
map: "name" | rows | ["Ada", "Ben", "Cy"] | No |
sum | numbers | 60 | No |
sum: "amount" | rows | 60 | No |
sort: "amount" | rows | Rows in ascending amount order: Ben, Ada, Cy | No |
sort_natural: "name" | rows | Rows ordered by name, ignoring case | No |
reverse | numbers | [30, 20, 10] | No |
uniq | tags | ["red", "blue"] | No |
compact | values | ["red", "blue"]; removes missing/null entries | No |
concat: other_tags | tags | ["red", "blue", "red", "green"] | No |
push: "green" | tags | Adds green at the end of the returned array | No |
unshift: "green" | tags | Adds green at the start of the returned array | No |
pop | tags | ["red", "blue"]; removes the last item from the result | No |
shift | tags | ["blue", "red"]; removes the first item from the result | No |
sample: 2 | tags | Two randomly selected items; omit the count for a single item | No |
where: "team", "Ops" | rows | Ada and Cy rows | No |
reject: "team", "Ops" | rows | Ben row, in an array | No |
find: "team", "Ops" | rows | First matching row: Ada; missing if there is no match | No |
find_index: "team", "Ops" | rows | 0, the first matching zero-based index; missing if no match | No |
has: "team", "Ops" | rows | true if any row matches | No |
group_by: "team" | rows | Groups with name and items: Ops contains Ada/Cy, Sales contains Ben | No |
where_exp: "row", "row.amount >= 20" | rows | Ada and Cy rows | No |
reject_exp: "row", "row.amount >= 20" | rows | Ben row, in an array | No |
find_exp: "row", "row.amount >= 20" | rows | Ada row | No |
find_index_exp: "row", "row.amount >= 20" | rows | 0 | No |
has_exp: "row", "row.amount >= 20" | rows | true | No |
group_by_exp: "row", "row.team" | rows | Groups by the evaluated team value | No |
Without a property, sort and sort_natural sort the items themselves. Property-based selection filters can omit the expected value to select truthy properties, such as where: "active". Expression filters take a local item name and a quoted Liquid expression; they do not run JavaScript.
Array transformations only affect the rendered result. They do not add, remove, or update stored records. sample is random and should not drive repeatable compliance or approval decisions.
Render a collection
This workflow template renders each tag and handles an empty collection:
liquid
{% assign tags = process.tags | uniq | sort %}
{% for tag in tags %}
{{ forloop.index }}. {{ tag | escape }}
{% else %}
No tags
{% endfor %}Date filters
These filters are available in workflow templates only. They do not use Nawfe's date_fmt format names or its workspace-aware formatting contract.
| Filter call | Input | Result / behavior |
|---|---|---|
date: "%Y-%m-%d", "+0000" | "2026-10-24T14:30:00Z" | 2026-10-24, using strftime-style tokens and a fixed UTC offset |
date_to_xmlschema | "2026-10-24T14:30:00Z" | XML Schema / ISO-style datetime |
date_to_rfc822 | "2026-10-24T14:30:00Z" | RFC 822-style date |
date_to_string | "2026-10-24T14:30:00Z" | Short month format, such as 24 Oct 2026 |
date_to_long_string | "2026-10-24T14:30:00Z" | Long month format, such as 24 October 2026 |
Prefer date_fmt for workflow-facing dates so workspace locale and timezone apply. Do not mix %Y-%m-%d from date with yyyy-LL-dd from date_fmt.
Formatting and locale helpers
These filters are available in workflow templates only.
to_string
Converts a value to text. Use it for a primitive value; use json when you need a serialized object or array.
liquid
{{ 42 | to_string | append: " items" }}Result: 42 items.
deburr
Removes supported Latin accents and combining marks. It is not general transliteration for every writing system.
liquid
{{ "déjà vu" | deburr }}Result: deja vu.
number_fmt
Formats a number using the resolved locale. Workflows use the workspace locale, with en-US as the fallback.
liquid
{{ 12345.67 | number_fmt }}For en-US, the result is 12,345.67. Other locales use their own separators.
date_fmt
Formats a date using the workspace's locale and timezone:
liquid
{{ processExecution.createdAt | date_fmt }}
{{ processExecution.createdAt | date_fmt: "DATE_MED" }}
{{ processExecution.createdAt | date_fmt: "yyyy-LL-dd HH:mm" }}The format argument is a preset name or a custom date/time pattern using the tokens below. The default is DATETIME_SHORT.
If no workspace settings are available, the fallbacks are en-US and UTC.
Use ISO inputs for predictable date interpretation. The handler also accepts supported natural-language values such as "now", "tomorrow", "in 3 days", and "2 hours ago". Relative values are evaluated at render time, not when the workflow was authored.
liquid
{{ "tomorrow" | date_fmt: "ISO_DATE" }}
{{ "2026-10-24T14:30:00Z" | date_fmt: "yyyy-LL-dd" }}The second result is 2026-10-24 in UTC; timezone conversion can change the date when the input is near midnight.
Available presets:
| Family | Presets |
|---|---|
| Dates | DATE_SHORT, DATE_MED, DATE_MED_WITH_WEEKDAY, DATE_FULL, DATE_HUGE |
| Times | TIME_SIMPLE, TIME_WITH_SECONDS, TIME_WITH_SHORT_OFFSET, TIME_WITH_LONG_OFFSET |
| 24-hour times | TIME_24_SIMPLE, TIME_24_WITH_SECONDS, TIME_24_WITH_SHORT_OFFSET, TIME_24_WITH_LONG_OFFSET |
| Datetimes | DATETIME_SHORT, DATETIME_MED, DATETIME_MED_WITH_WEEKDAY, DATETIME_FULL, DATETIME_HUGE |
| Datetimes with seconds | DATETIME_SHORT_WITH_SECONDS, DATETIME_MED_WITH_SECONDS, DATETIME_FULL_WITH_SECONDS, DATETIME_HUGE_WITH_SECONDS |
| ISO and interchange | ISO, ISO_DATE, ISO_TIME, RFC2822, HTTP, FILESTAMP |
| Date parts | YEAR, YEAR_SHORT, MONTH, MONTH_SHORT, MONTH_NUM, MONTH_NUM_SHORT, DAY, DAY_SHORT, DAY_NUM, DAY_NUM_SHORT |
DAY is the weekday name; DAY_NUM is the day of the month. MONTH_NUM and DAY_NUM are zero-padded; the _SHORT variants are not. FILESTAMP uses yyyyLLdd_HHmmss. The HTTP preset always uses UTC.
Useful custom tokens:
| Token | Meaning |
|---|---|
yyyy | Four-digit year |
LL, dd | Two-digit month and day of month |
HH, mm, ss | 24-hour hour, minute, and second |
LLLL, ccc | Localized month name and abbreviated weekday |
get_locale
Returns the resolved locale. Its input value is ignored.
liquid
{{ "" | get_locale }}For a workspace using US English, this produces en-US.
get_tz
Returns the workspace's timezone:
liquid
{{ "tenant" | get_tz }}For a workspace configured for Chicago, the result is America/Chicago.
Formula filter list
Form logic allows only the filters marked Yes above:
text
abs, append, at_least, at_most, capitalize, ceil, default, divided_by,
downcase, escape, escape_once, first, floor, join, last, lstrip, minus,
modulo, newline_to_br, plus, prepend, remove, remove_first, remove_last,
replace, replace_first, replace_last, round, rstrip, size, slice, split,
strip, strip_html, strip_newlines, times, truncate, truncatewords, upcaseFor a formula example, replace the literal input with a field reference:
liquid
{{ fields.email.value | strip | downcase }}
{{ fields.amount.value | default: 0 | at_least: 0 | round: 2 }}See Form formulas for setup and validation.