9

Fields - Filters

Customer Support

Last Update 6 maanden geleden

You can use special modifiers for Fields and Smart Fields e.g.:

Special Field Filter “format”

If you want format number that reflect money in some specific world format you can do that using format filter. It will allow you set following parameters:

  • decimal points (default: 2)
  • thousands delimiter (default: ',')
  • decimal delimiter (default: '.')


[fieldName] | format:[decimalPoints]:"[thousandDelimiter]":"[decimalDelimiter]"

Special Field Filter “toFixed”

It’s pretty common that you need to calculate the field and see the output in specific precision (especially if you calculate price/cost in some currency).

E.g. If the result of the calculation are 1.54212 > the output will be converted to 1.54. It's a simplified format function. If you want to round numbers to specific precision use the "round" filter instead.

Special Field Filter “round”

This filter works in a similar way as "toFixed" however it rounds up value to specific precision

Special Field Filter “inWords”

It’s quite common that you need your value being spelled in words on your document

E.g. If results value is 4500, output will be converted to “four thousand and five hundred”

Let’s apply this to example above to get proper USD values:

By Default inWords is set to English but it support following languages:

  • en (English, default)
  • ar (Arabic)
  • cz (Czech)
  • dk (Danish)
  • de (German)
  • es (Spanish)
  • fr (French)
  • fa (Farsi)
  • he (Hebrew)
  • hu (Hungarian)
  • id (Indonesian)
  • it (Italian)
  • ko (Korean)
  • lt (Lithuanian)
  • lv (Latvian)
  • nl (Dutch)
  • no (Norwegian)
  • pl (Polish)
  • pt (Portuguese)
  • ru (Russian)
  • sr (Serbian)
  • tr (Turkish)
  • uk (Ukrainian)
  • zh (Chinese)

Special Field Filter “date” & "time"

You can convert the displayed date or time format using a filter "date" or "time"


It supports two optional parameters:

{field | date:'[format]':'[timeZone]'}

{field | time:'[format]':'[timeZone]'}


format [optional] - output format using language code (12 hours vs 24 hours etc.) - Examples: en-US, en-GB, fr-FR, de-DE, pl-PL, es-ES, it-IT | Default: 'en-US'

timeZone [optional] - timezone in Intl format - Examples: America/Chicago, Europe/Berlin, Europe/Warsaw, Europe/Rome | Default: 'Universal' UTC Timezone


See list of Available Timezones:

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones


If incorrect format / timezone will be provided Documentero will use default values.

Format per Country Examples:

Special Field Filters "capitalize", "uppercase", "lowercase"

You can use one of "capitalize", "uppercase", and "lowercase" filters if you want to change the formatting of text to uppercase or lowercase. You can make only first letter uppercase using capitalize. Check examples below:

Special Field Filter “hide"

You can use "hide" filter if you want to hide field output on regular field. Useful if you need to use field value withing Smart Fields or Smart Sections but you don't want to show actual value in the document

Was this article helpful?

0 out of 0 liked this article