You need to sign in to do that
Don't have an account?
Philip Essien 8
Create a formula field that returns an image to indicate data quality.
Sales Managers have asked for an at-a-glance solution to see completeness on leads. Create a helper formula field that looks at 5 key fields on the Lead object and evaluates their completeness, then a second formula field that references the helper formula and returns an image.The helper formula field should be on the Lead object with a name of 'Lead Quality Helper' and a resulting API name of 'Lead_Quality_Helper__c'.
The helper formula should be of type Number.
The helper formula should evaluate the following 5 fields: Email, Phone, Company, Title, and Industry and return 0 if blank and 1 if not blank. The formula should then add all the values together to return a total value.
The image formula should be on the Lead object with a name of 'Lead Quality' and a resulting API name of 'Lead_Quality__c'.
The image formula should reference the helper formula, and return an image based on the number returned by the helper formula. The helper formula should be of type Text. Note: All of these images are already available in your Developer Edition.
1 = /img/samples/stars_100.gif with alternate text '1 star'
2 = /img/samples/stars_200.gif with alternate text '2 stars'
3 = /img/samples/stars_300.gif with alternate text '3 stars'
4 = /img/samples/stars_400.gif with alternate text '4 stars'
5 = /img/samples/stars_500.gif with alternate text '5 stars'
If none of the fields are filled out, the default should be /img/samples/stars_000.gif with alternate text '0 stars'.
The 'Lead Quality' formula must be added to the Lead Layout page layout.Check Challenge
ANS:
Lead Quality (Text) =
IF(Lead_Quality_Helper__c=1,
IMAGE("/img/samples/stars_100.gif","1 star"), IF(Lead_Quality_Helper__c=2, IMAGE("/img/samples/stars_200.gif","2 stars"), IF(Lead_Quality_Helper__c=3,
IMAGE("/img/samples/stars_300.gif","3 stars"),
IF(Lead_Quality_Helper__c=4,
IMAGE("/img/samples/stars_400.gif","4 stars"),
IF(Lead_Quality_Helper__c=5,
IMAGE("/img/samples/stars_500.gif","5 stars"),
IMAGE("/img/samples/stars_000.gif","0 stars"))))))
Lead Quality Helper (Number) =
IF(ISBLANK(Email),0,1)+
IF(ISBLANK(Phone),0,1)+
IF(ISBLANK(Company),0,1)+
IF(ISBLANK(Title),0,1)+
IF(ISBLANK(TEXT(Industry)),0,1)
I can't see what I am doing wrong. Everything works just fine but I keep getting this error.
Challenge Not yet complete... here's what's wrong:
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.
Any help will be appreciated. Thanks.
Using Text Formulas
Create a formula field that returns an image to indicate data quality.
Sales Managers have asked for an at-a-glance solution to see completeness on leads. Create a helper formula field that looks at 5 key fields on the Lead object and evaluates their completeness, then a second formula field that references the helper formula and returns an image.The helper formula field should be on the Lead object with a name of 'Lead Quality Helper' and a resulting API name of 'Lead_Quality_Helper__c'.
The helper formula should be of type Number.
The helper formula should evaluate the following 5 fields: Email, Phone, Company, Title, and Industry and return 0 if blank and 1 if not blank. The formula should then add all the values together to return a total value.
The image formula should be on the Lead object with a name of 'Lead Quality' and a resulting API name of 'Lead_Quality__c'.
The image formula should reference the helper formula, and return an image based on the number returned by the helper formula. The helper formula should be of type Text. Note: All of these images are already available in your Developer Edition.
1 = /img/samples/stars_100.gif with alternate text '1 star'
2 = /img/samples/stars_200.gif with alternate text '2 stars'
3 = /img/samples/stars_300.gif with alternate text '3 stars'
4 = /img/samples/stars_400.gif with alternate text '4 stars'
5 = /img/samples/stars_500.gif with alternate text '5 stars'
If none of the fields are filled out, the default should be /img/samples/stars_000.gif with alternate text '0 stars'.
The 'Lead Quality' formula must be added to the Lead Layout page layout.Check Challenge
ANS:
Lead Quality (Text) =
IF(Lead_Quality_Helper__c=1,
IMAGE("/img/samples/stars_100.gif","1 star"), IF(Lead_Quality_Helper__c=2, IMAGE("/img/samples/stars_200.gif","2 stars"), IF(Lead_Quality_Helper__c=3,
IMAGE("/img/samples/stars_300.gif","3 stars"),
IF(Lead_Quality_Helper__c=4,
IMAGE("/img/samples/stars_400.gif","4 stars"),
IF(Lead_Quality_Helper__c=5,
IMAGE("/img/samples/stars_500.gif","5 stars"),
IMAGE("/img/samples/stars_000.gif","0 stars"))))))
Lead Quality Helper (Number) =
IF(ISBLANK(Email),0,1)+
IF(ISBLANK(Phone),0,1)+
IF(ISBLANK(Company),0,1)+
IF(ISBLANK(Title),0,1)+
IF(ISBLANK(TEXT(Industry)),0,1)
I can't see what I am doing wrong. Everything works just fine but I keep getting this error.
Challenge Not yet complete... here's what's wrong:
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.
Any help will be appreciated. Thanks.
Try that and see if it passes
NOTE: When adding code please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.
I have the same issue with the following aswers:
Lead Quality Helper :
IF(ISBLANK(Email),0,1)+
IF(ISBLANK(Phone),0,1)+
IF(ISBLANK(Company),0,1)+
IF(ISBLANK(Title),0,1)+
IF(ISBLANK(TEXT(Industry)),0,1)
Lead Quality :
IMAGE(
CASE(Lead_Quality_Helper__c,
1, "/img/samples/stars_100.gif",
2, "/img/samples/stars_200.gif",
3, "/img/samples/stars_300.gif",
4, "/img/samples/stars_400.gif",
5, "/img/samples/stars_500.gif",
"/img/samples/stars_000.gif"),
"Unknown")
Lead Quality Helper
Lead Quality
What does your lead layout look like after adding the fields to your object and to the page layout? What I have is as follows:
Please try with below ones.
Lead_Quality_Helper:
IF( AND( ISBLANK( Email ), ISBLANK( Phone ), ISBLANK( Company ), ISBLANK( Title ), ISPICKVAL(Industry, "") ) , 0, IF(ISBLANK(Email),0,1)+
IF(ISBLANK(Phone),0,1)+
IF(ISBLANK(Company),0,1)+
IF(ISBLANK(Title),0,1)+
IF(ISBLANK(TEXT(Industry)),0,1))
Lead Quality:
IF(Lead_Quality_Helper__c=1,
IMAGE("/img/samples/stars_100.gif","1 star"), IF(Lead_Quality_Helper__c=2, IMAGE("/img/samples/stars_200.gif","2 stars"), IF(Lead_Quality_Helper__c=3,
IMAGE("/img/samples/stars_300.gif","3 stars"),
IF(Lead_Quality_Helper__c=4,
IMAGE("/img/samples/stars_400.gif","4 stars"),
IF(Lead_Quality_Helper__c=5,
IMAGE("/img/samples/stars_500.gif","5 stars"),
IMAGE("/img/samples/stars_000.gif","0 stars"))))))
So, there appears to be no way around it, and prior modules require the custom domain, otherwise you can't do lightning stuff.
Has this been resolved yet? It's keeping me from my challenge points!!
Thank you
[1] https://developer.salesforce.com/forums/?id=906F00000005JciIAE
[2] https://www.youtube.com/watch?v=1rKrBR5qbTg
When I use the formula from above the next error pops up
The object
Name is Lead Quality Helper
Type is Number
API Name is Lead_Quality_Helper__c
I am now trying to create the Lead Quality Object
Name: Lead Quality
API Name: Lead_Quality__c
Type: Text
Lenght 10
Formula:
Lead Quality
01IMAGE(
02 CASE(
03 Lead_Quality_Helper__c,
04 1, "/img/samples/stars_100.gif",
05 2, "/img/samples/stars_200.gif",
06 3, "/img/samples/stars_300.gif",
07 4, "/img/samples/stars_400.gif",
08 5, "/img/samples/stars_500.gif",
09 "/img/samples/stars_000.gif"
10 ),
11 CASE(
12 Lead_Quality_Helper__c,
13 1, "1 star",
14 2, "2 stars",
15 3, "3 stars",
16 4, "4 stars",
17 5, "5 stars",
18 "0 stars"
19 )
20)
Thanks PCON
But still
What am I overlooking?
Error: Field Lead_Quality_Helper__c may not be used in this type of formula
Lead Quality Helper is asking you to chek to see if values are Blank/NULL then return 0, else return 1 and then add regardless of the number to the next IF Statment. So it should look something like this...
Lead Quality Helper:
IF(ISBLANK(Company), 0, 1)+
IF(ISBLANK(Title), 0, 1)+
IF(ISBLANK(Email), 0, 1)+
IF(ISBLANK(Phone), 0, 1)+
IF(ISBLANK(TEXT(Industry)), 0, 1)
For Industry you dont need to check the picklist, you only need to check if a option is selected.
For Lead Quality a Case is best so you good there and all you need to do for this one is simply create a Case which references Lead_Quality_Helper and then continues to check the "Number of Stars". At the end of the Case you have to create something called a default case which if all of the Cases fail it goes to the last one no matter what. So it should look something like this...
Lead Helper
CASE( Lead_Quality_Helper__c,
1, "/img/samples/stars_100.gif",
2, "/img/samples/stars_200.gif",
3, "/img/samples/stars_300.gif",
4, "/img/samples/stars_400.gif",
5, "/img/samples/stars_500.gif",
"/img/samples/stars_000.gif")
Hopefully this helps you out!
Good luck!
Best regards,
Frank
Greetings!
Please use CASE inside the formula field.
Because if you want to implement the IF-ELSE ladder then CASE is the best option provided by Salesforce.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi