AutoBridge

Add a Formula Field

A Formula field calculates its value from other fields, so nobody has to type it or keep it in sync. Use it for values such as a full name built from first and last names, a total of several fees, or the number of days until a permit expires.


Prerequisites

  • Your role has Configure Entity on the entity, and the entity is not locked.
  • The fields the formula uses already exist on the entity, or on an entity it is linked to by an association field.

Steps

1

Open the entity's Configure page

Go to System Tools then Entities, click the ⋯ menu on the entity's row, and choose Configure.

2

Click + on the section

In the Sections pane, click the + button (tooltip Add Field) on the section the field belongs in.

3

Pick Formula

On the Custom tab, choose Formula under All. The panel shows the Formula Builder.

4

Name the field

Type the Field Label for the result, such as Total Fees or Days Until Expiration.

5

Insert a function

In the Function Code editor, click Formula to browse the function list, or start typing a function name in capital letters (for example IF) to see matching functions. Each entry shows a description, its syntax, and an example. Pick one to insert it.

6

Insert fields

Click Fields, or type an opening brace, to pick a field from this entity. Fields of linked entities are listed too. The field is inserted as a tag in the formula.

7

Finish the expression and click Add

Combine functions, fields, numbers, and quoted text, then click Add.

How formula values are filled in

A formula is calculated by the platform after a record is saved, not while someone is typing. Formula fields cannot be placed on a form; the form builder shows them as calculated by a formula. They appear on grids, detail pages, and dashboards like any other field.


Function library

CategoryFunctions
ConditionalIF, SWITCH
MathematicalSUM, COUNT, AVG, MIN, MAX, ROUND, ABS, DIVIDE, MULTIPLY, MINUS, MOD, POWER, SQRT, LOG
LogicalAND, OR, NOT, XOR, EXACT
TextCONCATENATE, UPPER, LOWER, LEN, IN, LEFT, RIGHT, MID, TRIM, REPLACE, REPT, SEARCH, SUBSTITUTE, TEXT, STR, VALUE
Date & TimeTODAY, NOW, DATE, DATEVALUE, DATEADD, ADD_DAYS, SUBTRACT_DAYS, DATEDIFF, DAYS, WORKDAY, WORKDAYS, MONTH, YEAR, DAY, HOUR, MINUTE, SECOND, HOURS_DIFF, MINUTES_DIFF, ADD_MINUTES, SUBTRACT_MINUTES, FORMAT_DATE, IOSWEEKNUM, WEEKNUM
ArrayAPPEND, EXTEND, REMOVE
ConstantsPI, TRUE, FALSE

A few common patterns, shown with field names in braces:

GoalFormula
Join two text fieldsCONCATENATE({First Name}, " ", {Last Name})
Add up feesSUM({Plan Review Fee}, {Permit Fee}, {Technology Fee})
Days between two datesDATEDIFF({Expiration Date}, TODAY(), "days")
A due date 30 days outADD_DAYS({Application Date}, 30)
A label based on a valueIF({Estimated Cost} > 100000, "Major", "Minor")

Example

A Building Permit entity with three fee fields.

SettingValue
Field LabelTotal Fees
Function CodeSUM({Plan Review Fee}, {Permit Fee}, {Technology Fee})
SectionFees

After a permit is saved, Total Fees shows the sum. Add it as a grid column or a dashboard Number widget.


Common mistakes

  • Expecting the value to update while the form is open. The result appears after the record is saved.
  • Trying to add a formula field to a form. It is calculated, so it cannot be entered on a form.
  • Typing a field name instead of inserting it. Use Fields or the brace shortcut so the reference is a real field tag.
  • Comparing dates as text. Use the Date & Time functions with Date fields.
  • Using a formula for values that come from outside the record. Use an automation instead. See the Automation Builder overview.

Related guides