Articles in this section

capitalize helper

The capitalize helper capitalizes the first letter of a string and leaves all other characters unchanged. Use it to ensure sentences, labels, or field values start with a capital letter.

Syntax

{{capitalize field}}

field -- The string to capitalize. Required. Accepts a literal string or field reference.

Examples

Capitalize the first letter of a sentence

{{capitalize record.day}}

Input: record.day is "today is the day!"
Output: Today is the day!

Capitalize a hard-coded string

{{capitalize "hello world"}}

Output: Hello world

Capitalize a single word

{{capitalize record.type}}

Input: record.type is "dog"
Output: Dog

Usage notes

  • Only the first letter of the string is capitalized. All other characters remain unchanged, including the casing of subsequent words.
  • If the string starts with a space or punctuation, the first alphabetic character may not be in the expected position. Trim whitespace before passing the value if needed.
  • To capitalize the first letter of every word, use the capitalizeAll helper instead.