Function Reference

Set the value of a column

Set the value of a column

How to set the value of a column

How to set the value of a column

Written By: Marvin Hödlmoser

Last Updated on September 2, 2023

Set the value of a column

The value of a column can be set in the Report Editor:

To use the value of other columns the syntax is: {{column name}}.

Tip: Please be careful here. You must write the exact same name of the column as it is written in the tab Layout. Pay attention to the spelling and spaces! The safest way is it, to copy and paste the name from there.

Access any other column you selected in Selection. Then you can use the value by surrounding the name with {{ }}.

Evaluate math expressions

You have the flexibility to employ all functions listed on the math.js page. Instead of using math.evaluate, simply enclose your expression within double square brackets [[ ]].

For example:

Instead of

math.evaluate(( {{item_unit_price}} * 100 ) / (100 + {{item_tax_rate}} ))

use

[[ ( {{item_unit_price}} * 100 ) / (100 + {{item_tax_rate}} ) ]]

This format simplifies the usage of mathematical expressions.

Please be aware that math expressions are only functional in mappings or when combined with variables in custom fields. To write math expressions the syntax is: "[[math expression]]".

There are (nearly) no limits. Here are some examples:

[[ 1.2 * ( {{Line items: Weight of product variant}} + 4.5) ]]

[[ sin(45 deg) ^ {{Line items: Quantity}} ]]

[[ {{Line items: Total price}} - ({{Line items: Total discount}}/1.2) ]]

If you need more complex functions, take a look at the function library we use.

Use DataChamp functions

  • Output the date of today: Date(%Y%m%d)

Tip: Please check the Date Format options

An example would be to use the function to fill the date of today into custom column for every line of your export:

  • Add days: addDays(Date(%d.%m.%Y), 30)

This will add 30 days to the current date.