How to do Addition and Subtraction in 'Message templates' in Portrait Dialogue

To perform arithmetic operations in the message template, Custom plugin needs to be created. Follow these steps to create a plugin in 'Dialogue Admin' and execute it in a 'Message Template' in Visual Dialogue.
  •     Open Dialogue Admin.
  •     Navigate to Resource -> Plugin Repository -> Expression plugins.
  •     Right click on the window displaying the plugins and select New.
  •     Provide Identifying Name in General tab.
  •     Navigate to Implementation tab. Select Script language as JScript.
  •     Paste the Addition and Subtraction code (attached) in the Code window and select Syntax check.
  •     Now, open Visual Dialogue and create new message template (Letter Master template).
  •     Navigate to Expression functions in the Toolbox.
  •     In a Message template, the plugin is available in the Expression function and listed under User defined functions.
UPDATED:  July 28, 2017