> For the complete documentation index, see [llms.txt](https://docs.documint.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators.md).

# Functions & Operators

{% hint style="warning" %}
Most formatting can be done in the settings for the Fields Token. This is mainly used for formatting that is not yet supported in the Fields Token UI.

<p align="center"><img src="/files/Jrqh22ZxebZOsgwbUYYp" alt=""></p>
{% endhint %}

Documint uses an enhanced version of [Handlebars](https://handlebarsjs.com/guide/#what-is-handlebars) as its templating engine. This means all valid Handlebars syntax is valid Documint syntax. Below is a list of custom functions that can be used in your Documint templates.&#x20;

#### Combining Functions

You can combine functions by wrapping the inner function in parenthesis.

```handlebars
//Example
{{$multiply ($add amount_1 amount_2) ($add amount_3 amount_4)}}
```

Here we're using the `$add` function to sum two sets of values then multiplying them together. Functions in parenthesis will be evaluated first and returned to its parent function.&#x20;

## General

### $calc

The $calc function is a powerful expression evaluator that enables complex calculations, string manipulations, array operations, and provides a secure sandbox environment within your templates.

{% content-ref url="/pages/jzOYDrwNo79Vip129bQJ" %}
[$calc](/legacy-documentation/data-and-variables/functions/calc.md)
{% endcontent-ref %}

## Math

{% content-ref url="/pages/XRj361DhecINJkv0L5np" %}
[$add](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdadd.md)
{% endcontent-ref %}

{% content-ref url="/pages/A5ApeBp9tyTlUWGZsrbr" %}
[$subtract](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdsubtract.md)
{% endcontent-ref %}

{% content-ref url="/pages/HIeiSb5VYDgIRf3sTzdd" %}
[$multiply](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdmultiply.md)
{% endcontent-ref %}

{% content-ref url="/pages/CTluG3WhoE7cWnyRiVo3" %}
[$divide](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usddivide.md)
{% endcontent-ref %}

{% content-ref url="/pages/s4YsyYod2SUJzXh49hWR" %}
[$sum](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdsum.md)
{% endcontent-ref %}

{% content-ref url="/pages/6Qt29phABeLqZjshTHmb" %}
[$min](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdmin.md)
{% endcontent-ref %}

{% content-ref url="/pages/o9880uXz2lqwbzbJiNXl" %}
[$max](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdmax.md)
{% endcontent-ref %}

{% content-ref url="/pages/h3Ky97yMqx55gWPcLh97" %}
[$mean](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdmean.md)
{% endcontent-ref %}

{% content-ref url="/pages/16TCd3a0KIIaWseyiu3C" %}
[$round](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdround.md)
{% endcontent-ref %}

{% content-ref url="/pages/N936qw1WlJrTIGurBnde" %}
[$floor](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdfloor.md)
{% endcontent-ref %}

{% content-ref url="/pages/uyyLP5RCxejoK4pENuck" %}
[$ceil](/templates/working-with-dynamic-data/functions-and-operators/functions/math/usdceil.md)
{% endcontent-ref %}

## List/Arrays

{% content-ref url="/pages/7ICHllP0m5hQd6dafNsK" %}
[#each](/templates/working-with-dynamic-data/functions-and-operators/functions/list-arrays/each.md)
{% endcontent-ref %}

{% content-ref url="/pages/X1NEZumBAbGoEfIvL7po" %}
[$filter](/templates/working-with-dynamic-data/functions-and-operators/functions/list-arrays/usdfilter.md)
{% endcontent-ref %}

{% content-ref url="/pages/RFo5MKiCqzAN9rK7E81R" %}
[$group](/templates/working-with-dynamic-data/functions-and-operators/functions/list-arrays/usdgroup.md)
{% endcontent-ref %}

{% content-ref url="/pages/qaUtgp8lZYxKtRBsPP9h" %}
[$join](/templates/working-with-dynamic-data/functions-and-operators/functions/list-arrays/usdjoin.md)
{% endcontent-ref %}

## Helpers

{% content-ref url="/pages/rtMPOGDDEEsk4wIwH9Mn" %}
[$extname](/templates/working-with-dynamic-data/functions-and-operators/functions/helpers/usdextname.md)
{% endcontent-ref %}

{% content-ref url="/pages/iiymsusHXc6nwgRkKFad" %}
[$inspect](/templates/working-with-dynamic-data/functions-and-operators/functions/helpers/usdinspect.md)
{% endcontent-ref %}

## Content

{% content-ref url="/pages/E8dNzDQ79H7lp6J5MNTP" %}
[$link](/templates/working-with-dynamic-data/functions-and-operators/functions/content/usdlink.md)
{% endcontent-ref %}

{% content-ref url="/pages/a9MAUpJEcJJmRhRVsRD9" %}
[$md](/templates/working-with-dynamic-data/functions-and-operators/functions/content/usdmd.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
