Calculated Tags allow the user to:
- manipulate one or more tags to provide a newly calculated output in the merged document.
- concatenate string values or calculate data tag’s merged values of one or more tags.
- to sum values, inside tables, of a row item from two or more separate fields of a table in the data source.
Adding a Calculated Tag:
1) In the Data Tags right side pane, select the data source or a table tag which contains the child data tag on which the Total Tag should be based on.
2) Click on “Add Tag” (becomes available after selection).
3) Under Properties on the left of the New Tag window select “Calculated”.
4) Give the Calculated Tag a name.
5) Select a Data Type (Numeric or String).
6) Then select Data Tags to apply the calculation to.
7) Optional for String Data Type: A regular expression can be applied to the Data Tags in order to manipulate the merged data in any way possible with the use of regular expressions.
Numeric Calculation in a Table:
1) Follow steps 1 - 5 above, but select Numeric Data Type
2) Select a numeric tag from the Data Source or tables.
3) Now use an operator from the example in grey below the text box.
4) Add another Data Tag to complete the calculation and Click Ok.
5) The tag is created as a Table Child Tag, which means it has to be used in the table and will sum those 2 Data Tags for every row.