DocsDynamic data & loops

Format dynamic values

Add format steps to any token — numbers, currency, dates, “3 days ago”, text case, lists and if-then logic — without code.

A token can take format steps after its argument, each starting with ~, applied in order:

{item:price~currency(USD)}          → $1,250.00
{item:views~compact}                 → 1.25M
{post_date~ago}                      → 3 days ago
{item:status~map(active=Open,*=Closed)}
{item:stock~if(lt,5,Low stock,In stock)}
{post_title~upper~truncate(40)}

In the builder, click Format on any token field to add steps from a list instead of typing them.

Every format step#

Numbers

StepWriteExample
Number~number(decimals, us|eu|space|none)1250000 → 1,250,000
Compact number~compact(decimals)1250000 → 1.25M
Currency~currency(code (USD, EUR…), compact)1250 → $1,250.00
Percentage~percent(decimals, number (value is already a percentage))0.25 → 25%
Round~round(decimals)
Round down~floor
Round up~ceil
Absolute value~abs
Add~add(number)
Subtract~sub(number)
Multiply~mul(number)
Divide~div(number)

Dates

StepWriteExample
Date~date(PHP date format)2026-09-25 → September 25, 2026
Time ago~ago3 days ago

Text

StepWriteExample
UPPERCASE~upper
lowercase~lower
Title Case~title
Capitalize first letter~capitalize
Trim spaces~trim
Truncate~truncate(length)
Remove HTML~strip
Slug~slug
Replace~replace(find, replace with)
Add before~prefix(text)
Add after~suffix(text)

Logic

StepWriteExample
When empty~default(text)
Yes / No~yesno(yes text, no text)
If…then…else~if(eq|ne|gt|gte|lt|lte|contains|empty, value, then, else)if(lt,5,Low stock,In stock)
Map values~map(value=Label, …, *=Otherwise)map(active=Open,closed=Closed)

Lists

StepWriteExample
Join list~join(and|comma|space|slash|pipe|newline or text)
First item~first
Last item~last
Item at position~nth(index (from 0))
Number of items~count
Field of each item~pluck(field path)

Good to know#

  • Dates use PHP date formats (F j, Y → September 25, 2026). Dates written as text keep their wall-clock time; timestamps are treated as UTC.
  • Currency knows 26 currency codes.
  • Steps run left to right, so ~truncate(40)~upper and ~upper~truncate(40) both work.