Dynamic field functions
Every helper you can use in a Dynamic field template, for text, numbers, logic and dates, with the date format codes and interval units.
- Verified Nov 17, 2026
- Classic builder
On this page
A Dynamic field template is written in Handlebars. These are the helpers it can use. Helper names are case-sensitive: write them exactly as shown.
Write a helper and its arguments inside double braces, separated by spaces: {{toFixed field_50 2}}. Put text arguments in quotes. To use a helper's result inside another helper, wrap it in parentheses: {{toFixed (multiply field_50 10) 2}}. A block helper such as #if has an opening and a closing tag: {{#if field_37}} ... {{/if}}.
Text helpers #
| Helper | What it does |
|---|---|
lowercase | Text in lowercase. |
uppercase | Text in uppercase. |
capitalizeFirst | Capitalizes the first letter. |
capitalizeEach | Capitalizes the first letter of each word. |
titleize | Capitalizes each word. On screen it also turns - and _ into spaces. |
sentence | Capitalizes the first letter of each sentence. On screen it also lowercases the rest. |
reverse | The characters in reverse order. |
truncate text length [omission] | Cuts text to length characters, ending with omission if you give one (the omission counts toward the length). |
center text spaces | Adds spaces non-breaking spaces before and after. Use triple braces. |
newLineToBr text | Turns line breaks into <br>. Use triple braces. |
sanitize text | Makes text safe for URLs and file names. On screen every character that is not a letter or digit becomes -. |
inflect count singular plural [include] | The singular word when count is 1, otherwise the plural. Add true to put the count in front. |
ordinalize number | 1st, 2nd, 3rd, 4th and so on. |
Examples:
{{!-- field_100 = "this is a test string" --}}
{{uppercase field_100}} THIS IS A TEST STRING
{{capitalizeFirst field_100}} This is a test string
{{capitalizeEach field_100}} This Is A Test String
{{reverse field_100}} gnirts tset a si siht
{{truncate field_100 10 "..."}} this is...
{{inflect field_101 "customer" "customers" true}} 3 customers (field_101 = 3)
{{ordinalize field_102}} 22nd (field_102 = 22)
{{{newLineToBr field_103}}} Number helpers #
| Helper | What it does |
|---|---|
add a b [c ...] | The sum of the values. |
subtract a b [c ...] | The first value minus the others. |
multiply a b [c ...] | The product of the values. |
divide a b [c ...] | The first value divided by the others. |
floor n | Rounded down to a whole number. |
ceil n | Rounded up to a whole number. |
toFixed n digits | The number with exactly digits decimal places. In exports and the API the result also has thousands separators. |
toInt n | The whole-number part: 22.7abc gives 22. |
toFloat n [digits] | The number read from text, rounded to digits decimal places if you give them. |
digitGrouping n | The number with a comma between each group of thousands: 2222222 gives 2,222,222. |
math a operator b | One operation: +, -, *, / or % (remainder). With ==, !=, <, <=, >, >= it returns true or false. |
Examples:
{{!-- field_50 = 100.5, field_51 = 4 --}}
{{add field_50 5}} 105.5
{{multiply field_50 field_51}} 402
{{divide field_50 2}} 50.25
{{floor field_50}} 100
{{ceil field_50}} 101
{{toFixed (multiply field_50 1.08) 2}} 108.54
{{math field_50 "%" 3}} 1.5
${{toFixed (add field_50 field_51) 2}} $104.50 Logic helpers #
| Helper | What it does |
|---|---|
#if value | Shows the block when the value is not empty, not 0 and not false. Use {{else}} for the other case and {{else if ...}} to chain. |
#unless value | Shows the block when the value is empty, 0 or false. |
#is a b | Shows the block when the two values are equal. |
#isnt a b | Shows the block when the two values are not equal. |
#gt a b, #gte a b | Greater than, greater than or equal to. |
#lt a b, #lte a b | Less than, less than or equal to. |
#and a b, #or a b | Both values are true; either value is true. |
iss value test yes no | Inline: returns yes when value equals test exactly, otherwise no. |
#each list | Repeats the block for each item, such as each connected record. {{this}} is the current item. |
Comparison helpers also work inside parentheses, which lets you combine them with #if, #and and #or. Compare text with quoted text, such as "Lead": in exports and the API, is only matches when both values are exactly the same.
Examples:
{{#if field_37}}
{{multiply field_37 10}}
{{else}}
No value
{{/if}}
{{#is field_35 "Lead"}}This customer is a lead{{else}}Not a lead yet{{/is}}
{{#gt field_100 8}}More than 8{{else}}8 or less{{/gt}}
{{#if (and (gt field_10 0) (lt field_10 100))}}In range{{/if}}
{{#if (is field_status "Approved")}}
<span style="color: green;">Approved</span>
{{else if (is field_status "Pending")}}
<span style="color: orange;">Pending</span>
{{else}}
<span style="color: red;">Rejected</span>
{{/if}}
{{iss field_40 "Yes" "Active" "Inactive"}} Date helpers #
| Helper | What it does |
|---|---|
formatDate date format | The date written in the format you give (see Format codes). |
now [format] | The current date and time, in the format you give. |
timeago date | How long ago, such as 4 days ago or Just now. |
age date ["Y,M,D"] | The number of whole years from the date to now. Give a list of units in quotes to get text such as 34 years 2 months 5 days; "1" uses every unit. |
dateAdd date "n unit" [format] | The date plus an interval (see Intervals). Without a format the result looks like 2026-11-17 14:30:00. |
dateSub date "n unit" [format] | The date minus an interval. |
dateDiff date1 date2 "units" | The time between two dates, in the units you list: Y years, M months, D days, H hours, Mi minutes, S seconds, comma-separated, or 1 for all. With one unit you get just the number. |
Wherever a helper takes a date, you can write "now" instead of a field for the current date and time (in dateAdd, dateSub and dateDiff). For dateDiff, a month counts as 30 days and a year as 365 days.
Examples:
{{!-- field_34 = 2026-05-19 17:00 --}}
{{formatDate field_34 "%m/%d/%Y"}} 05/19/2026
{{formatDate field_34 "%B %-d, %Y"}} May 19, 2026
{{formatDate field_34 "%I:%M %p"}} 05:00 PM
{{now "%Y-%m-%d"}} today's date
{{timeago field_34}} 6 months ago
{{age field_20}} 34 (field_20 = a birth date)
{{dateAdd field_34 "7 days" "%Y-%m-%d"}} 2026-05-26
{{dateSub field_34 "1 month" "%Y-%m-%d"}} 2026-04-19
{{dateDiff "now" field_90 "D"}} days between today and field_90
{{dateDiff field_34 field_35 "D,H"}} 3 days 4 hours Format codes #
formatDate, now, dateAdd and dateSub take a format made of these codes. Any other character is shown as written.
| Code | Shows |
|---|---|
%Y | Year, 4 digits (2026) |
%y | Year, 2 digits (26) |
%m | Month, 01–12 |
%-m | Month, 1–12 |
%B | Month name (January) |
%b or %h | Short month name (Jan) |
%^B, %^b | Month name in capitals (JANUARY, JAN) |
%d | Day of the month, 01–31 |
%-d or %e | Day of the month, 1–31 |
%j | Day of the year, 001–366 |
%H | Hour, 00–23 |
%k | Hour, 0–23 |
%I | Hour, 01–12 |
%l | Hour, 1–12 |
%M | Minute, 00–59 |
%S | Second, 00–59 |
%L | Milliseconds, 000–999 |
%p | AM or PM |
%P | am or pm |
%A | Weekday name (Sunday) |
%a | Short weekday name (Sun) |
%^A, %^a | Weekday name in capitals |
%u | Day of the week, Monday = 1 to Sunday = 7 |
%w | Day of the week, Sunday = 0 to Saturday = 6 |
%V | ISO week number, 01–53 |
%G | ISO week-based year |
%z | Time-zone offset (+0900) |
%:z | Time-zone offset with a colon (+09:00) |
%s | Seconds since 1970-01-01 (Unix time) |
%F | Same as %Y-%m-%d |
%D or %x | Same as %m/%d/%y |
%T or %X | Same as %H:%M:%S |
%R | Same as %H:%M |
%r | Same as %I:%M:%S %p |
%% | A literal % |
Intervals #
dateAdd and dateSub take the interval as a number and a unit in one quoted value, such as "1 day" or "3 months". The units are:
secondorsecondsminuteorminuteshourorhoursdayordaysmonthormonthsyearoryears
A number on its own, such as "10", means days. For weeks, use days: "14 days".
{{dateAdd field_91 "1 day" "%Y-%m-%d %I:%M %p"}}
{{dateSub "now" "6 months" "%B %Y"}} Helpers that work only on screen #
On pages and forms the template runs in the browser; in exports and API responses it runs on the server. A few helpers exist only in the browser, and a template that uses one shows nothing in exports and the API:
round: usetoFixed n 0instead.toExponential.isIn,isContains,orEquals.
toPrecision gives different results on screen and on the server, so avoid it in fields you export.
Was this page helpful?
Something wrong or missing on this page? Tell us.