Throughout the DocuMerge app, and including your templates, you can use operators and functions to refine and transform your data for logic and display purposes. Below is a list of available operators and functions. For other formatting modifications, check out Modifiers. Here’s a few examples of basic calculations you can make within your document templates,…
Written by devops
Throughout the DocuMerge app, and including your templates, you can use operators and functions to refine and transform your data for logic and display purposes. Below is a list of available operators and functions. For other formatting modifications, check out Modifiers.
Here’s a few examples of basic calculations you can make within your document templates, as well as fields within the DocuMerge application. These examples print the value (output the value in document templates or email delivery templates) after any transforming and calculating:
{($x / $y)|round:2}
{$x - $y + $_a}
{$x + ($_a + $_b)}
Instead of outputting the calculation, you can also create a new variable or set and existing variable. You can create and set variables within your templates and document/route fields (settings, rules, field maps, email templates, delivery fields, etc).
Variables Notes: We recommend you use an “_” when creating variables within the DocuMerge app. This will help you quickly determine variables that are locally created versus the variables created from your incoming data. Also, variables set on the fly are not globally accessible during a merge process, thus variables created or overwriting incoming data will not pass along to other parts of of the merge process. IE: a variable created/set within a template is available for use during that merge within only that template, and only after it’s created/set. It’s not available in Rules or some other settings field. To create and set global variables, use the Document or Route Field Map.