# Functions & Operators

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="../../legacy-documentation/data-and-variables/functions/calc" %}
[calc](https://docs.documint.me/legacy-documentation/data-and-variables/functions/calc)
{% endcontent-ref %}

## Math

{% content-ref url="functions-and-operators/math/usdadd" %}
[usdadd](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdadd)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdsubtract" %}
[usdsubtract](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdsubtract)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdmultiply" %}
[usdmultiply](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdmultiply)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usddivide" %}
[usddivide](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usddivide)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdsum" %}
[usdsum](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdsum)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdmin" %}
[usdmin](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdmin)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdmax" %}
[usdmax](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdmax)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdmean" %}
[usdmean](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdmean)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdround" %}
[usdround](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdround)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdfloor" %}
[usdfloor](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdfloor)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/math/usdceil" %}
[usdceil](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/math/usdceil)
{% endcontent-ref %}

## List/Arrays

{% content-ref url="functions-and-operators/list-arrays/each" %}
[each](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/list-arrays/each)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/list-arrays/usdfilter" %}
[usdfilter](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/list-arrays/usdfilter)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/list-arrays/usdgroup" %}
[usdgroup](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/list-arrays/usdgroup)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/list-arrays/usdjoin" %}
[usdjoin](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/list-arrays/usdjoin)
{% endcontent-ref %}

## Helpers

{% content-ref url="functions-and-operators/helpers/usdextname" %}
[usdextname](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/helpers/usdextname)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/helpers/usdinspect" %}
[usdinspect](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/helpers/usdinspect)
{% endcontent-ref %}

## Content

{% content-ref url="functions-and-operators/content/usdlink" %}
[usdlink](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/content/usdlink)
{% endcontent-ref %}

{% content-ref url="functions-and-operators/content/usdmd" %}
[usdmd](https://docs.documint.me/templates/working-with-dynamic-data/functions-and-operators/content/usdmd)
{% endcontent-ref %}


---

# Agent Instructions: 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.
