
Create a Flag Formula Field
- Step 1: Formula Field. Select ‘formula’ from the list of field types.
- Step 2: Choose Output Type.
- Step 3: Formula Editor. You may want to come back to this step after you’ve read the examples that follow this section.
- Step 4: Check Syntax. Click ‘Check Syntax’ in case your Salesforce org uses different field names, instead of the...
...
Create a Flag Formula Field
- Step 1: Formula Field. Select 'formula' from the list of field types.
- Step 2: Choose Output Type. ...
- Step 3: Formula Editor. ...
- Step 4: Check Syntax.
What is a flag field in Salesforce?
A flag field is a Salesforce formula field that displays an image when conditions are met – in this case, either a red, orange or green flag will display when the relevant conditions exist. Just like creating any custom field in Salesforce setup, go to the ‘Object Manager’, and search for Leads.
How do I show the green flag in Salesforce?
IMAGE (“/img/samples/flag_green.gif”,”Green Flag”))) Otherwise, show the green flag. Click ‘Check Syntax’ in case your Salesforce org uses different field names, instead of the standard ones.
How can I add badges to a Salesforce field?
There are existing solutions for putting graphical image flags into a Salesforce field. We can add badges using static resources, as noted in this NPSP best practice post and this Trailhead module. Those are great tips and they certainly work, but they can be a pain to maintain.
How to create custom leads in Salesforce with formulas?
Just like creating any custom field in Salesforce setup, go to the ‘Object Manager’, and search for Leads. Then, go to ‘Fields and Relationships’, and click the ‘New’ button. Select ‘formula’ from the list of field types. Choose the output type as Text: You may want to come back to this step after you’ve read the examples that follow this section.

How do I show a flag in a Formula field in Salesforce?
Go to Setup=>Customize=>Cases=>Fields. Select Formula Data Type and select next button as shown above....Displaying Case Priority Flags with Formula FieldEnter Field label as Priority Graphic.Field name will be automatically generated with underscores.Select Text as Formula return type.Select Next button.
How do I add an image to a formula field in Salesforce?
Upload your image file to your Documents storage area.Click the Documents tab.Click New.Enter the document name to be displayed on the browser.From the "Folder" picklist, select the folder you created in Step 1.Click Browse to locate and select the file to upload.Click Save.
How do I create an image in Salesforce?
Create a public folder to hold your image files. ... Upload your image file to your Documents storage area. ... Create a custom field within the Object where you want the images to display. ... Obtain the URL to the image files uploaded in Step 2: ... Repeat Step 4 and Step 5 until each image URL are added to your new custom field.More items...
How do I display an image in Salesforce lightning?
To display images, use the HTML element. Include an image in your component by uploading it as a static resource or content asset.To display an icon, use the lightning:icon component, which gives you access to Salesforce Lightning Design System icons or your own custom icon.
Key business problem
Sometimes, text or numbers just aren’t evocative enough to catch users’ attention at the right moment. Whether it’s in a single field, a compact layout, or a big flashing section of a page layout, there are always moments when it would be nice to have an image that conveys meaning in an instant.
How I solved it
Let’s go back to the Academy Group tracking several measures of student success. By adding in an image flag, it’s instantly clear whether each measure is in a problem zone or not:
How did I do it?
Emoji aren’t just for texting anymore. They’ve available on any computer. (On a Mac, just hit Command+Ctrl+Space and the Emoji keyboard pops up!) You can use emoji anywhere you would normally use a text character like a letter, number, or punctuation mark.
Business results
Once those formula fields were built to display, it was a simple matter to drop them on a report together. Now, that’s the go-to report for the Academy Group’s learning team to see which students need some extra attention to get them back on track.
Bonus wins
Some of your Salesforce users might be visually impaired, using a screen reader or other assistive device. By supplementing the number indicator with a large and colorful image, some visually-impaired users will already have an easier time right off the bat. And screen reader users get automatic alt text read aloud for the emoji.
Do try this at home
I showed a pretty specific example from a particular nonprofit, but the principle applies anywhere. How might you use it?
Resources
Check out other posts in the How I Solved This series for more problem solving for admins, by Admins.
Charts that Engage and Educate
The best charts are both informative and eye-catching. They’re meant to both inform your audience and, let’s face it, wow them a bit.
Sign Up for a Tableau CRM-Enabled Developer Edition Org
For this project, you can’t use an existing Developer Edition org or a Trailhead Playground org. Follow the steps below to get a Tableau CRM-enabled Developer Edition that comes with a limited Tableau CRM Platform license and contains the sample data required for this project.
Add Flag Images to the Image Gallery
We’ve given you files to use for flags in your fancy gauge. Click here to download a zip file, then use these steps to upload the files to the image gallery:
Verify Step
You’ll be completing this project in your own hands-on org. Click Launch to get started, or click the name of your org to choose a different one.

Key Business Problem
- Here are some examples of mailability flags I have set up for my clients. These formulas use the standard Salesforce fields (where applicable), plus some custom ones that creep their way in; be aware that you need to replace the field names with your own, and a syntax check (step 4) will q…
How I Solved It
How Did I Do It?
Business Results
Bonus Wins
- Let’s go back to the Academy Group tracking several measures of student success. By adding in an image flag, it’s instantly clear whether each measure is in a problem zone or not: In fact, you can start to make sense of a whole report at a glance (even when we shrink it for display as a screenshot):
Do Try This at Home
- Emoji aren’t just for texting anymore. They’ve available on any computer. (On a Mac, just hit Command+Ctrl+Space and the Emoji keyboard pops up!) You can use emoji anywhere you would normally use a text character like a letter, number, or punctuation mark. Basically, the hardest part of the formula for each of those fields was deciding which emoji would represent each category…
Resources
- Once those formula fields were built to display, it was a simple matter to drop them on a report together. Now, that’s the go-to report for the Academy Group’s learning team to see which students need some extra attention to get them back on track.