0

So I have an NPS object setup and one of the items (Text field) is based on the NPS score, either 1 of 3 images will show and this works fine example: NPS Look

Basically I am trying to have it show the image however also show text after it for example this image would have "Promoter" right after it but I am not able to get any formula code to work, I have tried + " Promoter" and && but all I get is the text show and the image breaks.

Code:

IF(
NOT(
ISBLANK(Net_Promoter_Score__c)),
(IF(Net_Promoter_Score__c < 7, IMAGE("/resource/1586983206000/GraphicsPackNew/tangodesktopproject/16/theme/process-stop.png", " Detractor"),
IF(Net_Promoter_Score__c > 8,IMAGE("/resource/1586983206000/GraphicsPackNew/tangodesktopproject/16/theme/face-grin.png", " Promoter"),
IMAGE("/resource/1586983206000/GraphicsPackNew/tangodesktopproject/16/theme/weather-showers-scattered.png", " Passive")
)
)
),
"")

Just curious if there is a way to include the verbiage to be displayed with the image in the text field.

2
  • The formula field won't display images and text together that way. You'll have to edit your images to include the text so that it is part of the image itself. Apr 16, 2020 at 15:14
  • @DavidCheng Do you know of alternative formulas where I could get this to work? would CASE work if I list out each number option? Apr 16, 2020 at 16:19

1 Answer 1

-1

IF( NOT( ISBLANK(Net_Promoter_Score__c)), (IF(Net_Promoter_Score__c < 7, IMAGE("/resource/1586983206000/GraphicsPackNew/tangodesktopproject/16/theme/process-stop.png", " Detractor")+ " Detractor", IF(Net_Promoter_Score__c > 8,IMAGE("/resource/1586983206000/GraphicsPackNew/tangodesktopproject/16/theme/face-grin.png", " Promoter")+ " Promoter", IMAGE("/resource/1586983206000/GraphicsPackNew/tangodesktopproject/16/theme/weather-showers-scattered.png", " Passive") + " Passive" ) ) ), "")

1
  • 1
    Hi Ramesh, welcome to SFSE. Please take a moment to scroll through the tour and read How to Answer. Code dumps are discouraged here. Adding some explanation outside of just the raw solution helps people better understand what you are trying to convey.
    – Adrian Larson
    Oct 27, 2022 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .