Skip to main content

Modifiers

This guide provides a comprehensive overview of how to utilize data modifiers within the merge system. It covers various aspects, including formatting dates, performing arithmetic operations, calculating percentages, and implementing boolean modifiers.


Data Modifiers

Data modifiers change how a field's value is displayed or calculated. Add a modifier after the field name, separated by a dash, with arguments in parentheses. Example: job-closingDate-format(d MMMM yyyy).

Common modifier types:

ModifierPurposeExample UsageResult Example
formatFormat value (date, number)job-closingDate-format(d MMMM yyyy)5 June 2025
addAdd to value (number/date)job-purchasePriceTotal-add(5000)Adds $5,000 to total price
percentCalculates the amount based on the percentage you put in the bracketsjob-commissionTotal-percent(50)Shows 50% of commission total (calculated)

Percentage Modifier

You can use the percent modifier to display a calculated amount based on a percentage of a value, such as a commission. The modifier computes the percentage of the base field value and displays the resulting amount.

Example:

  • job-commissionTotal-percent(50) — if the commission total is $10,000, this shows $5,000.

Format Modifiers

Use the format modifier to control how dates appear. Common patterns:

Format StringExample OutputDescription
yyyy2025Year only
yy25Last two digits of year only
MMMMJuneMonth only (text)
MM06Month only (number)
M6Month only no leading zero (number)
d5Day only
dd05Day only (2 digits)
d MMMM yyyy5 June 2025Day Month Year (month as text)
MMMM yyyyJune 2025Month Year
M/d/yyyy6/5/2025US short date
yyyy-MM-dd2025-06-05ISO date format
dd MMM yyyy05 Jun 2025Day (2 digits) Short Month Year
MMM yyyyJun 2025Short Month Year
d-MMM-yy5-Jun-25Day-ShortMonth-2digitYear

In Use:

  • Email example: {{job-closingDate-format(d MMMM yyyy)}}
  • PDF example: job-closingDate-format(d MMMM yyyy)

Real case: If the closing date is 5 June 2025, job-closingDate-format(d MMMM yyyy)5 June 2025.


Add Modifier

Use add to increase or decrease numbers or to add/subtract days from dates.

Add to Numbers

  • job-purchasePriceTotal-add(5000) — adds $5,000 to the purchase price.

Add to Dates (Add/Subtract Days)

  • job-closingDate-add(7) — adds 7 days to the closing date.
  • job-closingDate-add(-3) — subtracts 3 days from the closing date.

Example: If the closing date is 5 June 2025:

  • job-closingDate-add(7) → June 12, 2025
  • job-closingDate-add(-3) → June 2, 2025

Boolean Modifiers

Yes Or No

  • Purpose: Outputs "Yes" or "No" based on a boolean value.
  • Example: purchaser-[]-isResident-yesOrNo()Yes when true, No when false.

X or No X

  • Purpose: Outputs "X" or an empty, commonly used for checkbox-like outputs.
  • Example: purchaser-[]-isResident-xOrNoX()X when true, otherwise empty.

Summary of Modifiers

ModifierUsage ExampleDescription
formatjob-closingDate-format(MMMM yyyy)Formats the closing date as "June 2025"
addjob-purchasePriceTotal-add(5000)Add 5,000 to total purchase price
add (date)job-closingDate-add(7)Add 7 days to closing date
percentjob-commissionTotal-percent(50)Show 50% of commission total (calculated)
yesOrNopurchaser-[]-isResident-yesOrNo()"Yes" or "No" depending on boolean value
xOrNoXpurchaser-[]-isResident-xOrNoX()Outputs "X" or empty space depending on boolean value