In order to use scripts just use the following steps:
1. How to - Enable the Developer tab in the Ribbon
- From the Ribbon click on the File option;
- Navigate to the Options menu and select Developer tab;
- Check the Show Developer tab option
2. How to - Create your own Script
- From the Ribbon click on the Developer option;
- Click on the Manage Scripts;
- From the Manage Scripts pop-up select the desired script type;
- Modify the default function template with the desired function.
3. How to - add the newly created Script to the Template
- From the Ribbon click on the Insert option;
- From the Dynamic section, click on the drop-down Field menu and select Custom Field;
Note: A data source must be added in order to use this function;
- In the Insert Field dialog click on the Create expression option from the Advanced tab
- Select the Functions tab and navigate down to User Defined Functions category
- Insert the desired Script and notice that a Custom Field containing it has been created.
- Sample attached for reference.