Content

The content field in the export template editor is based on Apache Freemarker and supports most of the built-in references from this. See more information on these here.

How to use date and time formatting in the editor can be found here.

Features

The content field has a number of built-in features that can be used

Lists

You can create lists, this is a method to loop through records. In the code block below you see how to define a list. The #list is the function name, [recordset] refers to the recordset from the datatype used for the list. [variable] is the value used within the list to get fields from the recordset. The indented second line shows how a field would be referred to using variable and field name.

<#list [recordset] as [variable]>
    #{[variable].[fieldname]}
</#list>

Functions

The editor also supports the creation of functions that can be used within it. Add these at the bottom of the editor. A function is used by using ? as prefix for the field.

<#function [functionName] [variable]>
  <#if [variable] == ‘something’>
    <#return “Found something”>
  </#if>
    <#return “Did not find something”>
</#function>

Inline functions

There exists a number of inline functions that can be used also

Field prefix

Function

Description

#

?string(“0.00”)

Used on numeric fields to define how to format the number

?

?leftPad(X,””)

Used to pad the field value to the left with defined characters

?

?rigthPad(X,"")

Used to pad the field value to the right with defined characters

Fields

Each datatype has a number of fields available to be included in the export.

These can be seen in the list of available fields.

Last updated