Computed Fields – Bookmark Templates

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.

Prefix Result
xCMPDEC_ decimal value
xCMPINT_ integer value
xCMPDAT_ date/time value
xCMPSTR_ string value (text)

 

To add a placeholder bookmark for computed text:

  1. 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.
  2. 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.
  3. Highlight the placeholder, copy it, and insert a bookmark using the full prefix_alias_fieldname as the Bookmark Name.
  4. 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:

  1. 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.
  2. Format the line as Hidden Text.
  3. Highlight everything after the equals sign.
  4. 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).
  5. Click Add. The result of the calculation will appear in the newly created field in the Doc Template.