Cloudy holding a computer and standing next to text.

Formula Advice from the Awesome Admin Community

By

Learn MOAR is here! For Release Highlights for Admins, check out the blog post here.

Formula Advice From the Awesome Admin Community

Salesforce Admins are experts in their orgs, and they continue to generously share their knowledge with other Trailblazers. In conjunction with the Admin Best Practices: Building Useful Formulas Trailhead LIVE session, we thought it would be fun to hear from admins regarding any formula advice they have to dish.

We put out the question on Twitter: “#AwesomeAdmins, do you have helpful tips for someone who is learning or working with formulas?”

Many #AwesomeAdmins responded to the call. Below are a few we thought you’d find helpful.

Getting started tips

Salesforce MVP Squire Kershner recommends admins “write out what you want the formula to do … Then convert the sentence into a formula phrase by phrase,” as this helps define which function to use and where.

Formula tip from Squire Kershner on Twitter

Michelle Hansen, another Salesforce MVP, adds a bonus pro-tip: You can add comments to your formula field using “/* INSERT YOUR COMMENTS HERE*/”. Note: Adding comments using the syntax above will not impact the formula itself.

Formula tip from Michelle Hansen on Twitter.

Here’s an example of a formula with embedded comments:

AND(
/*competitor field is required, check to see if field is empty */
LEN(Competitor__c) = 0,
/* rule only enforced for ABCD record types */
RecordType.Name = "ABCD Value",
/* checking for any closed status, allows for additional closed picklist
values in the future */
CONTAINS(TEXT(StageName), "Closed")
)

Kat Harrison notes that “Debugging can be tricky” which may result in rebuilding the formula one syntax at a time.

Formula tip from Kat Harrison on Twitter.

Readability improvement tips

Several Twitter users also shared tips about formatting formulas for readability.

Twitter user @CatSubstrate notes that Excel skills can be helpful when starting out with formulas. They recommend using spaces and carriage returns in a formula which “makes it easier to ‘read’ (understand) the formula.”

Formula tip from @CatSubtrate on Twitter.

Mark Jones recommends using software such as “Notepad++ to write and format your formula. Also use tabs and indents, where possible, to help with formatting your formulas.”

Formula tip from Mark Jones on Twitter.

Bruce Perry notes, “When your formulas have functions within functions, consider putting each function on a new line. Nested formulas are hard to read.” Yes, they can be, for sure.

Formula tip from Bruce Perry on Twitter.

Here’s an example of a formatted formula using tabs, indentations with a function on each line:

IF (
            AND (
                      TEXT(Best_Method_of_Contact__c)=”Phone”,
                      ISBLANK(Phone__c)
                      ),
true, false)

Other pearls of wisdom

Other great tips were shared regarding formula ability in reports, resources, keeping a list of formula references, and avoiding page performance issues.

Salesforce MVP David Carnes dishes out report formula knowledge to the community by calling out the formula super powers of row level formulas, summary formulas, and cross block formulas.

Formula tip from David Carnes on Twitter.

Twitter user Paula DW recommends that once you find great formulas, “Make a note of it … Next time you need it, it will be there waiting.”

Formula tip from @PaulaDW_ on Twitter.

Sheetal cautions to use formulas wisely. “Too many formula fields impact page performance. For a complex formula, move [it] to Process Builder or Flow.”

Formula tip from @SheetalSfdc on Twitter.

John suggests following SteveMo’s Best Answers to “find all the answers to formula questions you didn’t know you had.”

Formula tip from @sfJohn_c on Twitter.

What great tips! It was fun to hear our expert admins on the field offer sound advice on formulas. Curious about tips of my own? Find them below:

  1. Google is your friend. You are not expected to know every formula function or write every formula from scratch. I’ve worked on the platform for nearly 10 years and I still Google formulas all the time. Find one that best matches your requirements and modify it to work for your situation. I recall Mike Gerholdt saying at a Dreamforce Keynote, “There is no shame in copying, pasting, and tweaking.”
  2. Start off simple, test it out, and then add from there. Do not build a complex formula only to find out it doesn’t work. Troubleshooting formulas is not easy. I make sure the smaller pieces can stand on their own before combining them in a complex formula.
  3. Don’t be afraid to ask for help if you’re stuck. Drop a post in the Formulas Help, Tips, and Tricks Trailblazer Community Group.

If you have a powerful formula or tip, be sure to share it on Twitter using the #AwesomeAdmin hashtag and start a conversation in the Admin Trailblazer Community.

Cloudy standing with a laptop next to text that says "Admin Best Practices User Management."

Admin Best Practices for User Management

Managing users is a core Salesforce Admin skill. One element of this skill is ensuring that each user has access to the right data so they can do their job. As admins, we also need to protect data that may be confidential, preventing users who don’t need to access that data from viewing, editing, or […]

READ MORE
Introducing Customer Service Incident Management

Build Customer Trust with Customer Service Incident Management

Since COVID-19, we’ve witnessed a remarkable transformation as more companies go digital to run their business from anywhere. While digital transformation has enabled so many companies to innovate in their service offerings, it has also introduced a new challenge: ensuring availability and uptime of those services. The reality is that a service disruption is inevitable. […]

READ MORE
Cloudy, Astro, and a snowman next to text that says, "LeeAnee's Ultimate 2021 Design Thinking Playlist."

LeeAnne’s Ultimate 2021 Design Thinking Playlist

As Salesforce Admins, we’re constantly working to design engaging and delightful user experiences. Whether we’re building custom pages with App Builder, customizing a mobile experience, or creating a useful and compelling dashboard, design is core to the work we do. With all of the new product releases and enhancements happening on the Salesforce Platform, especially […]

READ MORE

Have an Idea for a Story?

We are all about the community and sharing ideas.
Do you have an interesting idea or useful tip that you want to share?

SHARE YOUR IDEA