Skip to main content

Custom Functions overview

Create Template-level Custom Functions to simplify the formula syntax for your calculations.

Updated over 2 weeks ago

Catch-up quick

Reuse formulas with greater efficiency, or simplify syntax within complex formulas with Custom Functions.

Assign your Custom Functions a name upon creation, and reference them throughout your Template's formulas. Custom Functions are denoted by the dollar sign ($) prefix. This is formatted as. . .

=$”Assigned name”

So, if your function is named “TotalPay”, you’d reference it within your Template as =$TotalPay .

Shorten the syntax of your repeated or complex formulas with Custom Functions. With Custom Functions you’ll create a formula and assign it a name for reference throughout your Template. You can then. . .

  • Write, reference, and manage a formula that’s used multiple times in a Template from a centralized location.

  • Reference a string of syntax multiple times throughout a single formula.

💡As an example,

If you want to write a formula that populates a field value as total pay throughout your Template, you’d reference multiple fields in a calculation. Your Template would include fields named “TotalHours”, “HourlyRate”, and “Pay”.

To calculate the total pay, the syntax would be. . .

=If([TotalHours] > 40, (40 * [HourlyRate]) + (([TotalHours] - 40) * [HourlyRate] * 1.5), [TotalHours] * [HourlyRate])

But, with Custom Functions, you set up a function with the above formula and name your function “Total Pay”. Then, rather than rewrite the formula above within each field, enter. . .

=$TotalPay

Because the TotalPay definition relies on variables (that is, different hours worked, and different pay rates), it also includes function parameters. Here the function parameters are Hours and Rate.

Screenshot displaying an example of a custom function with all details populated.

So, in the “Pay” field’s Default Value property, you’d enter. . .

=$TotalPay([TotalHours],[HourlyRate])

Be sure to always include the “$” prefix when you reference your custom function.

Because Custom Functions are only available within the Template within which they’re created, they require access to the Template Editor.

Set up your Custom Functions in the Template Editor

In the web app’s Template Editor, you’ll access the Template settings (or cog menu) and select Custom Functions.

Screenshot displaying the Template Editor's cog menu opened with the Custom Functions option highlighted.

Here, you’ll create your functions by assigning a Name, Description, Function parameters, and a Definition.

Screenshot displaying the Custom Functions window prior to any data entry.

  • Name is the syntax you’ll use to reference your Custom Functions.

    Each Custom Function must have a unique name. If you’ve established naming conventions for your other account resources - like fields, Templates, or DataSources - be sure to follow them here.

    A dollar sign ($) is automatically included as a prefix to your function’s syntax. You’ll need to include the dollar sign whenever you reference your function.

    You can also select your Template’s available functions in the formula builder’s left-hand panel.

  • Description communicates what the function’s formula does.

    Provide a detailed description for future Custom Function management, and as a means of communication to others within your organization.

  • Function parameters are variables which you reference within a function.

    To populate your function parameters, you can either. . .

    • Reference the Template fields that correspond to each parameter’s value, or. . .

    • Enter hard-coded values for each parameter.


    As you add Custom Function parameters, you'll find the parameters you create in the left-hand scroll menu as you write your function's definition.

    Screenshot displaying "Hours" and "Rate" as custom function parameters in the custom function's definition.
  • Definition is where you’ll write your Custom Function’s formula or syntax.

As you create functions, you’ll access and manage them through the Template's Settings menu.

To reference a function within a formula, you can either enter them manually, or find your Template’s functions within the formula builder’s scrollable left-hand menu.

Screenshot displaying custom functions within the formula builder’s left-hand menu.

⚙️ Expert tip

Reference your Custom Functions within other Custom Functions. Nested functions help to simplify complex formulas.

Related topics

Did this answer your question?