Cert++
Close

Formula merge fields and global variables

Key Takeaway

Use merge fields for values from the record or a related object, and use $ global variables for context that isn't stored on the record. Each global variable supports only certain places.

A merge field is a reference inside a formula that pulls in a value from a record, either from a field on the same object or from a field on a related object. Global variables are special merge fields that start with $. They pull in context that is not stored on the record, such as the current user, company information, or custom metadata. Together, merge fields and global variables let a formula use related data and react to who is running it, so you don't have to hardcode values.

What a formula can contain

A formula can contain any of these:

  • Merge fields (field references)
  • Operators
  • Functions
  • Literal values
  • Other formulas

A merge field references another standard or custom field. Standard fields use the field name, such as Amount. Custom fields add __c, such as Competitor__c.

In a formula, you don't wrap a merge field in curly braces, and you don't put an exclamation point or the type of record in front of it. So you write AccountNumber. The "Insert Field" button or the drop-down list in the formula editor inserts the correct syntax for you.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Given a scenario, demonstrate the use of formula fields to meet stated business requirements

0/16

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers. 757 members and growing.