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
  1. Text helpers
  2. Number helpers
  3. Logic helpers
  4. Date helpers
  5. Format codes
  6. Intervals
  7. Helpers that work only on screen

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 #

HelperWhat it does
lowercaseText in lowercase.
uppercaseText in uppercase.
capitalizeFirstCapitalizes the first letter.
capitalizeEachCapitalizes the first letter of each word.
titleizeCapitalizes each word. On screen it also turns - and _ into spaces.
sentenceCapitalizes the first letter of each sentence. On screen it also lowercases the rest.
reverseThe 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 spacesAdds spaces non-breaking spaces before and after. Use triple braces.
newLineToBr textTurns line breaks into <br>. Use triple braces.
sanitize textMakes 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 number1st, 2nd, 3rd, 4th and so on.

Examples:

handlebars
{{!-- 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 #

HelperWhat 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 nRounded down to a whole number.
ceil nRounded up to a whole number.
toFixed n digitsThe number with exactly digits decimal places. In exports and the API the result also has thousands separators.
toInt nThe 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 nThe number with a comma between each group of thousands: 2222222 gives 2,222,222.
math a operator bOne operation: +, -, *, / or % (remainder). With ==, !=, <, <=, >, >= it returns true or false.

Examples:

handlebars
{{!-- 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 #

HelperWhat it does
#if valueShows 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 valueShows the block when the value is empty, 0 or false.
#is a bShows the block when the two values are equal.
#isnt a bShows the block when the two values are not equal.
#gt a b, #gte a bGreater than, greater than or equal to.
#lt a b, #lte a bLess than, less than or equal to.
#and a b, #or a bBoth values are true; either value is true.
iss value test yes noInline: returns yes when value equals test exactly, otherwise no.
#each listRepeats 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:

handlebars
{{#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 #

HelperWhat it does
formatDate date formatThe date written in the format you give (see Format codes).
now [format]The current date and time, in the format you give.
timeago dateHow 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:

handlebars
{{!-- 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.

CodeShows
%YYear, 4 digits (2026)
%yYear, 2 digits (26)
%mMonth, 01–12
%-mMonth, 1–12
%BMonth name (January)
%b or %hShort month name (Jan)
%^B, %^bMonth name in capitals (JANUARY, JAN)
%dDay of the month, 01–31
%-d or %eDay of the month, 1–31
%jDay of the year, 001–366
%HHour, 00–23
%kHour, 0–23
%IHour, 01–12
%lHour, 1–12
%MMinute, 00–59
%SSecond, 00–59
%LMilliseconds, 000–999
%pAM or PM
%Pam or pm
%AWeekday name (Sunday)
%aShort weekday name (Sun)
%^A, %^aWeekday name in capitals
%uDay of the week, Monday = 1 to Sunday = 7
%wDay of the week, Sunday = 0 to Saturday = 6
%VISO week number, 01–53
%GISO week-based year
%zTime-zone offset (+0900)
%:zTime-zone offset with a colon (+09:00)
%sSeconds since 1970-01-01 (Unix time)
%FSame as %Y-%m-%d
%D or %xSame as %m/%d/%y
%T or %XSame as %H:%M:%S
%RSame as %H:%M
%rSame 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:

  • second or seconds
  • minute or minutes
  • hour or hours
  • day or days
  • month or months
  • year or years

A number on its own, such as "10", means days. For weeks, use days: "14 days".

handlebars
{{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: use toFixed n 0 instead.
  • 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.