Syntax & Functions
Reference for all report template syntax, system fields, and functions available in Daxium-Air reports.
Functions index
<%MarkDown(SystemName)%>
Insert a rich text field preserving layout (Word only)
<%MarkDownEx([SystemName], Font, Size)%>
Insert a rich text field with a forced font and size (Word only)
System Fields
Use the following tags to access submission metadata in any report template.
Submission identification
Submission number
<%SubmissionId%> or <%Id%>
UID number
<%SubmissionUid%>
Submission creation
Date of first save on web
<%Created_At%>
Date of submission creation
<%DataCreatedAt%>
Submission creator — first name
<%[CreateUser.FirstName]%>
Submission creator — last name
<%[CreateUser.LastName]%>
Submission creator — email
<%[CreateUser.Email]%>
Report creator
Report creator — first name
<%[ReportUser.FirstName]%>
Report creator — last name
<%[ReportUser.LastName]%>
Report creator — email
<%[ReportUser.Email]%>
Last update
Date of last save on web
<%[Updated_At]%>
Date of submission update
<%[Updated_At]%>
Last modified by (email)
<%[UpdateUser.Email]%>
Form
Form name
<%StructureName%>
Form identifier
<%StructureId%>
Related task
Planned start date and time
<%[Task.PlannedStart]%>
Expected end date and time
<%[Task.PlannedEnd]%>
Deadline
<%[Task.PlannedDue]%>
Actual start date and time
<%[Task.RealStart]%>
Effective end date and time
<%[Task.RealEnd]%>
State (done, to be done)
<%[Task.FillStatus]%>
Time status (on time, late…)
<%[Task.TimeStatus]%>
Other information
Company name (from URL)
<%CompanyTitle%>
Native GPS position (mobile creation)
<%SubmissionLatitude%><%SubmissionLongitude%>
Inserting a Simple Field
A form field is inserted by surrounding its system name with <% and %>. These markers tell the system where the submission data should be inserted. You can apply any formatting supported by Word/Excel (bold, italic, underline) directly to the tag.
If your Text field uses the "Rich Text" option, use <%MarkDown(SystemName)%> to preserve the layout in Word reports. This is not functional in Excel.
To also force a specific font and font size on that rich text, use <%MarkDownEx([SystemName], 'Font', Size)%> instead:
[SystemName]
System name of the rich text field
'Font'
Font to apply
Size
Font size
This only works on Text fields using the "Rich Text" option, in Word reports. See PDF Fonts for the list of fonts supported when the report is converted to PDF.
System names are case sensitive.
Inserting a Formula
You can apply calculations directly between fields in a report tag.
<operator> can be any mathematical operation: +, -, *, /, %
ConstantExpression is a number with or without decimal places
Parentheses are supported
%is also the modulo operator
Examples:
<%Price * 1.196%>— With Price = 10: result is 11.96<%(Price * Quantity) – (15 / 100) * (Price * Quantity)%>— With Price=18 and Quantity=2: result is 30.6
Here is the complete list of supported mathematical functions. These are also case sensitive.

Repeat()
When the report template is in Listing Mode, the Repeat() instruction repeats a section of the document for each row of data. It must be placed in the first (leftmost) cell of the table row to repeat.
filter
Filtering condition, e.g. Id>3 or DateField<#date# (optional)
None
sort
Field system name to sort results by (optional)
None
The entire template can only contain one Repeat() instruction. If several are present, only the first one is detected.
Ex :

With 3 lines of data, the result is as follows:

Repeat() can be used in four ways:
Without any criteria
<%Repeat()%>
Filtering only
<%Repeat(Id>3)%>
Sorting only
<%Repeat(,Name)%>
Both filtering and sorting
<%Repeat(Id>3,Name)%>
Filtering results
Filter the repeated rows using a condition:
Dates use the format Day/Month/Year. You can also use #date# as a variable for today's date:
The second example means "5 days before today". The format is not case sensitive (#Date-5D# also works).
You can define the time interval using the units in the table below:

Use + instead of - to refer to future dates. Example: <%Repeat(DateField < #date+10d#)%> means today + 10 days.
You can combine filter conditions using AND or OR operators:
This filter syntax does not support functions that use Field System Names.
Avoiding data redundancy — DISTINCT()
When using Repeat(), use DISTINCT() to avoid repeating the same value:
For fields with multiple separate texts (dates, multi-level lists), use a second argument as a concatenation separator:
This returns all unique months of submission creation across the repeated set.
Sorting results
Repeat() accepts a second parameter to sort the results. The sorting criterion must be a column name:
Example:

Image Manipulation
Image()
Insert a single image from an image field:
Shorthand alias: <%Img(FieldName, Width, Height)%>
FieldName
System name of the image field
—
Width
Image width in pixels
—
Height
Image height in pixels (optional)
Same as Width
If height is omitted, the image is placed in a square of
Width × WidthpixelsIf both width and height are specified, the image fits that rectangle without distortion
Examples:
Large photo: <%Image(ImageFieldName, 200)%>

Small photo: <%Img(ImageFieldName, 70, 50)%>

Images()
For image fields that allow multiple images (max > 1), use Images() inserted in a one-column table:
FieldName
System name of the multi-image field
—
start
Index of the first image to include (optional)
1
end
Index of the last image to include (optional)
All

To define a size for the images, add <%Image()%>:
To retrieve additional data (metadata) from the images, enter the field in a table with the following structure:

Resizing images — UseImagesPreview()
Resize images before inserting them to reduce report weight and generation time:
Replace ImageSize with the attribute from the table below. All images following this tag will be resized accordingly:

UseImagesPreview() does not allow extraction of Exif data. There is no Exif information on preview images.
Retrieving comments of an image
Display the comment attached to a specific image in an image field:
Explanation:
ImageFieldNameis the system name of the image field.#xindicates the image number (1, 2, 3, etc.).Commentaccesses the comment associated with the image.
Example: <%Value:If(Exists('Photo#1Comment'), [Photo#1Comment], '')%>
Convert images to JPG — SetPdfJpegQuality()
Reduce image size by converting them to JPEG. The function takes a quality index between 1 and 100:
Add this tag in the Word document or in a cell of the PPActions sheet.
Insert an image from a relationship field (Excel)
To insert a photo from a related submission in an Excel report (not in listing mode):
Replace snake_case with CamelCase: capitalise the first letter of each word in the system name and remove underscores.
Map()
Display a map centered on the GPS coordinates of the submission. Requires the Google Maps API and a location field configured in the form.
latitude
Field containing the latitude coordinate
longitude
Field containing the longitude coordinate
address
Your location field system name
zoom
1 to 22 (22 = most detailed)
width
Map width in pixels
height
Map height in pixels
MapType
0 = Street View, 1 = Satellite, 2 = Mixed
Example with default location: <%Map(SubmissionLatitude, SubmissionLongitude, 17, 200, 200)%>

Example with a location field: <%Map(LocalizationIntervention_latitude, LocationIntervention_longitude, 17, 200, 200)%>

Exif data — ImageExif()
Retrieve Exif metadata stored in a photo (text data, GPS coordinates, etc.):
FieldName
System name of the image field
'ExifAttribute'
Exif attribute key, e.g. 'DateTime', 'GpsLatitude', 'GpsLongitude', 'GpsLatitudeDM'

Examples:
Image date:
<%ImageExif(Photo, 'DateTime')%>(Result: 08/25/2004)Map from photo GPS:
<%Map(ImageExif(LocationField, 'GpsLatitude'), ImageExif(LocationField, 'GpsLongitude'), 17, 150, 150)%>

For Excel reporting in Listing mode, the instruction to get Exif data is: <%Value:ImageExif([Photo],'DateTime')%> (Result: 25/08/2004 09:32)
Barcodes — BarCode()
Insert a barcode into a document:
data
The data to encode
'BarCodeType'
Barcode format — see types table below
width
Barcode width in pixels
height
Barcode height in pixels
Example: <%BarCode('123456789012', 'EAN13', 120, 120)%>

Available barcode types:
Code11
Primarily used for telecommunications equipment labeling
Codabar
Old code used in library and blood bank systems
EAN13
European article numbering — data must be 12 digits
EAN8
Compressed EAN for small products — data must be 7, 9, 12 or 13 digits
Industrial2of5
Old code, not in common use
Interleaved2of5
Compact digital code, used in industry and air cargo
MSI
Variation of the Plessey code, common in the US
Postnet
Used by the US Postal Service for automated mail sorting
UPCA
Universal product code for retail — data must be 12 digits
UPCE
Compressed UPC for small products — data must be 6 or 7 digits
Matrix2of5
Data can be any number of digits
IntelligentMail
Data must be 20 digits
QR Codes — QrCode()
Insert a 2D QR code into a template:
data
The data to encode
width
QR code width in pixels
height
QR code height in pixels
Example: <%QrCode('A String To Encode 123456', 150, 150)%>

Watermark — ImageWatermark()
Add text overlay on an image:
ImageFieldName
System name of the image field
—
ImageWidth
Image width in pixels
—
ImageHeight
Image height in pixels
—
WatermarkText
Text to display on the image
—
HorzAlign
Horizontal alignment: Left, Center, Right
Right
VertAlign
Vertical alignment: Top, Middle, Bottom
Bottom
ForegroundColor
Text color (#RRGGBB or constant)
Red
BackgroundColor
Text background color (#RRGGBB or constant)
White
BackGroundOpacity
Background opacity between 0 and 1
0 (invisible)
FontSize
Font size in pixels
12
Examples:
To insert a line break in the watermark text, use \u000A:

You can combine multiple data values using List():
To use a field value as the watermark text:
Watermark on a multi-image field
When an image field contains several images, combine Images() and ImageWatermark():
The combined instructions must be placed inside a table in the template. The image field system name is mentioned only once, in the Images() instruction — do not repeat it in ImageWatermark() or ImageExif().
Utility Functions
Functions are not case sensitive and can be combined. We recommend using CamelCase for function names.
Field names remain case sensitive in all cases.
Index()
Returns an auto-incremented sequence number in a listing array.
<%Index()%>


MapLetter()
Returns the letter of the map pin generated by the Google Maps API for a location point. Used in combination with Map().
<%MapLetter()%>

Example:

Result:

Format() — dates and numbers
Convert a Date or Number field to a specific display format. F() is a shortcut for Format().
'FormatString'
Format pattern — see table below
FieldName
Date or Number field to format
The available format patterns are shown in the table below:

Examples (with Price = 19.3 and Date = 02/14/2012 3:14:20 PM):
<%Format('0.00', Price)%>→ 19.30<%F('yyyy-MM-dd', Date)%>→ 2023-02-16
Date()
Returns the current date and time:
AddHours()
Add or remove hours from a date/time field:
Example: <%AddHours(DateTime, -6)%> (Result: 02/14/2023 06:00:00 instead of 12:00:00)
Use a positive number to add hours: <%AddHours(DateTime, 6)%>
AddDays()
NumberOfDays can be positive or negative. Example: <%AddDays(Date(), -5)%>
AddMonths()
Example: <%AddMonths(Created, -1)%>
AddYears()
Example: <%AddYears(Created, +2)%>
Add()
Returns the sum of multiple numerical values. Null or empty values are treated as 0.
Example: <%Add(Size1, Size2, Size3)%> — With Size1=5.3, Size2=2.3, Size3=null → 7.6
String manipulation
A character string is expressed via <%String()%> or its shortcut <%S()%>.
Concatenation
Use the + operator to concatenate strings. When mixing types, convert numbers to strings first with S():
<%S(Price) + ' Euros'%> → 14.32 Euros
ToUpper() / ToLower()
List()
Create a separated list from multiple values. If any element is empty, its separator is omitted:
separator
String to place between values
value1, value2, …
Fields or values to join
Example: <%List(', ', Address, PostalCode, City, Country)%> → 12 rue des églantiers, 17400, Lacanau, France
Can be combined with Map() to produce a valid address from separate fields.
Split()
Extract a value from a string containing a separator. Index starts at 0:
string
The string or field to split
separator
The delimiter character
IndexToExtract
Zero-based index of the segment to return
Example: <%Split(Address, ',', 2)%> — With Address = "12, rue des mines, Puteaux, 92800, France" → Puteaux
Type conversion
ToNumber() / N()
Convert a text string to a number:
Example: <%Format('0.00', N(Price))%> — With Price = "127.4202" → 127.42
The converted number can use either a comma , or period . as decimal separator — both are supported.
ToDate() / D()
Convert a text date to a real date:
Example: <%F('dd/MM/yyyy', ToDate(Date))%> — With Date = '02/14/2012 3:24:10 PM' → 02/14/2012
ToString() / S()
Convert the content of a field to a string:
Conditional Statements
If()
Display a value based on a condition:
condition
A boolean expression (e.g. Field = 'Value'). Use && for AND, || for OR.
'TrueResult'
Value returned when the condition is true
'FalseResult'
Value returned when the condition is false
'NotSetResult' (optional)
Value returned when the field is empty — enables the 3-value shorthand form
The condition must return true or false. The supported operators are:
==
Equal to
<>
Different than
!=
Not equal
&&
AND
||
OR
You can combine field comparisons with && and ||:
Boolean example — cover all three possible states (true, false, not set):
Or with the shorthand 3-value form:
The apostrophe character differs between Word and Excel. If you copy-paste a template from one to the other, replace the apostrophes manually.
Exists()
Test whether a field exists in the form:
Returns true or false. Especially useful for checking the presence of images:
Hide() / Display() / DisplayRow()
These functions show or hide entire sections of the document based on a condition. Always close with <%End%>.
Hide()
Hides a section when the condition is true:
Supported Boolean operators:
||
OR
&&
AND
<>
Different than
==
Equals
!=
Is not equal
Example with complex condition:
Display()
Shows a section when the condition is true (reverse of Hide()):
It is not possible to use both Hide() and Display() in the same condition.
DisplayRow()
Available in tables only. Displays a row when the condition is true. Must be placed in the first (leftmost) cell of the row, before any other content:
It is not possible to use both Hide() and DisplayRow() in the same condition. It is also not possible to display the current user in reports.
Contains()
Returns true if a string contains a given pattern:
String
The field or string to test
pattern
The substring to search for
Example: <%If(Contains(Field, 'measurement'), 'MEASURE', 'NOTHING')%>
The comparison is case sensitive. Use ToUpper() or ToLower() in combination with Contains() for case-insensitive matching: <%If(Contains(ToUpper(Field), 'MEASURE'), 'MEASURE', 'NOTHING')%>
StartsWith()
Returns true if a string begins with the specified value:
String
The field or string to test
Pattern
The prefix to search for
Example: <%If(StartsWith(Field, 'default'), 'Default value', '')%>
EndsWith()
Returns true if a string ends with the specified value:
String
The field or string to test
Pattern
The suffix to search for
Example: <%If(EndsWith(Field, 'END'), 'end', '')%>
Relationship
To include data from a related child form, use the Relation() instruction inside a table:
The table row repeats once for each child submission. If no child submissions are linked, the table is empty.
Example:

Result:

The "Relationship element" field type is not persistent and cannot be used in a report.
Sort a relationship
Sort the child submissions by a field value. Add the field system name as a second parameter.
Ascending: <%Relation('Relationship label', 'SystemNameOfField')%>
Descending: <%Relation('Relationship label', 'SystemNameOfDESCField')%>
Filter by subform
When a relationship field links to multiple subforms, filter by form name:
OrderBycorresponds to the sorting described above (leave empty string''to skip)StructureNameis the name of the form to filter on
Example — keep only submissions from the "Anomaly" subform:
Limit the number of child submissions
Pass the limit as the 4th parameter:
'Relation0'
System name of the relation field
'FieldX'
Field to sort by (optional)
StructureName='Form name'
Form to filter on (optional)
2
Maximum number of child submissions to display
Count child submissions
Display the number of submissions in a relationship:
<%[Relation.Count]%>
Capital letters are required — Relation.Count must be written exactly as shown.
Nested relationships
It is possible to insert the relationship of a relationship into your report. To do this, you must create a first table and insert your first relationship there, then insert a second table inside the first table:
in the following example we will see how to insert a relationship from the sub-form into a first table, named "relationship label" then how to insert a relationship from the sub-form into a second nested table. another form itself being related to this sub-form. This last relationship is called "relationship relationship wording".
It is possible to nest a relationship inside another relationship by creating a second table inside the first. You can go up to 8 levels deep.

Aggregation Functions
Arguments in aggregation functions must always be wrapped in single quotation marks. Example: <%Sum('ToNumber(Price)')%>
Count()
Counts the total number of submissions for the current set:
<%Count()%>
This statement can be used anywhere in the document.
Sum()
Returns the sum of a numeric field across all submissions:
<%Sum('FieldName')%>
If the field type may not be numeric, use N() to convert: <%Sum('N(Price)')%>
Avg()
Returns the average value of a field:
<%Avg('FieldName')%>
Min() / Max()
Returns the minimum or maximum value of a field:
<%Min('FieldName')%> / <%Max('FieldName')%>
GlobalMap()
Displays all location points from multiple submissions on a single map. Requires a template in Listing Mode.
LatitudeField
Field name containing latitude values (in single quotes)
LongitudeField
Field name containing longitude values (in single quotes)
ConnectPoints
true to connect dots with a line, false for pins only
Width
Map width in pixels
Height
Map height in pixels
MapType
0 = Road, 1 = Aerial, 2 = Mixed
Example: <%GlobalMap('latitude', 'longitude', true, 300, 300, 0)%>

With a relationship:

Chart()
Display a bar chart or pie chart from aggregated data:
GraphType
'Pie', 'Pie3D', or 'Bar'
AggregationFunction
A function such as Count() or Sum(field)
LabelField
Field name used to group and label results
DisplayValues
true to show values on the chart, false to hide them
Width
Chart width in pixels
Height
Chart height in pixels
Examples:
<%Chart('Bar', 'Count()', 'CustomerName', true, 500, 300)%>

<%Chart('Pie3d', 'Sum(Price)', 'ReparationType', false, 600, 300)%>

<%Chart('Pie', 'Count()', 'TypeReparation', true, 600, 300)%>

Special Cases
List fields
Isolate a level in a tree list
By default: <%ListSystemName%>
For a tree list with result A,B,C:
First level (A)
<%[ListSystemName.FirstLevel]%> or <%[ListSystemName.Level1]%>
Second level (B)
<%[ListSystemName.Level2]%>
Last level (C)
<%[ListSystemName.LastLevel]%> or <%[ListSystemName.LevelN]%>
For a multiple-choice list (no tree structure) with result A | B | C:
First item (A)
<%[ListSystemName.Item1]%>

