There may be times when you want to use values in the Spitfire document to calculate a new value. Use one of the xCMP prefixes to create a new computed field to include in your Bookmark Templates.
|xCMPSTR_||string value (text)|
To add a placeholder bookmark for computed text:
- Find the alias of the fields you want to use in your calculation. For example, if you want to divide your Current Request Amount (DocRevision_cmpToRevenueAmount) by your Net Pay Amount (DocRevision_cmpToExpenseAmount), the alias would be DocRevision.
- In the location where you want the results of your calculation to appear (in a table, paragraph, etc.), type the alias, an underscore, and a new fieldname (which can be anything). You can include simple prefixes.
- Highlight the placeholder, copy it, and insert a bookmark using the full prefix_alias_fieldname as the Bookmark Name.
- Note the alias + fieldname bookmark name you just created. You will need it for the xCMP_ prefix to add the computed field to a template.
To add a computed field to your template:
- In an empty area, type xCMPttt_Alias_NewFieldName = calculation (including fieldnames) where xCMPttt is one of the fields to be used in the calculation, NewFieldName is the name you created for the new field, and calculation (including fieldnames) is either a mathematical calculation of fields or a concatenation of text strings.
- Format the line as Hidden Text.
- Highlight everything after the equals sign.
- From the Insert ribbon select Bookmark. The name of the bookmark will be what you entered in front of the equals sign (in this example, xCMPDEC_DocRevision_myMarkupPct).
- Click Add. The result of the calculation will appear in the newly created field in the Doc Template.