Custom functions in Author Online
Custom functions allow authors to create user-defined calculations that can be reused across multiple templates. Authors can define the logic once and apply it as many times as they need within the same template, without rebuilding it each time. To reuse custom functions across templates, use an External Dictionary.
Creating a Custom function
To create a custom function:
- Click the hamburger menu in the upper-left corner and selectCustom functions.

- ClickCreate Custom Function.

- In the Create Custom Function dialog box, enter a name for the function and clickContinue.

- In the Definition field, enter the formula that defines the function. When defining the function logic, parameters are represented by a percentage sign (%) followed by the number of the parameter.
- %1 refers to the first parameter.
- %2 refers to the second parameter.
- %3 refers to the third parameter and so on.
- For example, if you want to create a function that automatically calculates an agreement end date based on a start date and term length, create a custom function namedyearsafteragreementand define it as. This custom function uses the built-indaysbefore(yearsafter(%1, %2), 1)yearsafteranddaysbeforefunctions. It accepts the agreement start date (%1) and term length (%2) as parameters to return the agreement end date.
