Articles in this section

trim helper

The trim helper removes leading and trailing whitespace from a string. Use it to clean up field values that may contain extra spaces before or after meaningful text, particularly when comparing strings or passing values to case-sensitive systems.

Syntax

{{trim field}}

field -- The string or field to trim. Required. If the value is empty or contains only whitespace, the helper returns an empty string.

Examples

Remove leading and trailing spaces from a field

{{trim record.artist}}

Input: record.artist is " Lalo Schifrin "
Output: Lalo Schifrin

Return raw output with triple braces

{{{trim record.title}}}

Use triple braces when downstream systems require the exact trimmed string without Celigo's automatic formatting.

Usage notes

  • Only leading and trailing whitespace is removed. Spaces within the string are preserved.
  • If the value is empty or contains only whitespace, the helper returns an empty string.
  • To remove non-whitespace characters from the edges of a string, use the chop helper instead.