# Inserting data

To insert data from a record,,into an email, the following syntax is used.

`{FIELDNAME}`

### <span class="mw-headline" id="bkmrk-custom-functions-1">Custom functions</span>

A couple of functions are implemented, allowing minor modification of data from fields, before inserting it.

Syntax: `@[FUNCTION]({FIELDNAME} [PARAMETER])`

#### <span class="mw-headline" id="bkmrk-function%3A-fallback-1">Function: FALLBACK</span>

Sample: `@FALLBACK({NAME} Friend)`

If the given field does not have a value, or is not found, the PARAMETER value will be used instead.

#### <span class="mw-headline" id="bkmrk-function%3A-dateadd-1">Function: DATEADD</span>

Sample: `@DATEADD({DATE} 3 weeks)`

If the given field is a Date, Time or DateTime field, the value is modified by the given amount (positive or negative)

Supports wrapping inside FORMAT (see below).

Supported periods: minute(s), hour(s), day(s), week(s), month(s), year(s)

#### <span class="mw-headline" id="bkmrk-function%3A-datesub-1">Function: DATESUB</span>

Sample: `@DATESUB({DATE} 3 weeks)`

If the given field is a Date, Time or DateTime field, the value is modified by the given amount (positive or negative)

Supports wrapping inside FORMAT (see below).

Supported periods: minute(s), hour(s), day(s), week(s), month(s), year(s)

#### <span class="mw-headline" id="bkmrk-function%3A-format-1">Function: FORMAT</span>

Sample: `@FORMAT({NUMBER} 000.000)` or `@FORMAT({DATE} MMM, d YYYY)`

Formats a given number or date to the specified format.

Number formatting uses [DecimalFormat](https://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html) and date formatting uses [SimpleDateFormat](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html).

It is possible to wrap this function around DATESUB and DATEADD like this: `@FORMAT(@DATEADD({DATE} 3 weeks) MMM, d YYYY)`