function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Weber Sales SupportWeber Sales Support 

formula fields - please help

I am new to this kind of formula field and I am having issues with this formula not applying the requested values to the different pick list  options on multiple fields:

CASE( Store_in_Prime_Location__c , "Perfect location within strategic plan" ,20, "Good Area outside defined plan",10,0 ) +
CASE( Prepared_to_Relocate__c , "Yes this is the preferred location", 10 ,"Not the Prefered Location see Dealer Review file for further information",0, 0) +
CASE( External_Signage__c , "Average", 5, "Good", 10, "Outstanding" , 15 ,0) +
CASE( Rate_the_Street_Frontage__c , "Mid to small frontage with limited improvement possible", 5, "Mid-range frontage with potential to improve visibility", 10, "Strong Street Presence Clearly visible with high traffic", 15 , "Large Frontage 2 sides highly visible to all traffic" , 20 , 0) +
CASE( How_many_carparks_available__c , "Minimal Car Parking easily accessible", 5, "Ample Car Parks easily accessible", 10,0) +
CASE(Property_Status__c , "Owned", 5, 0)

I am hoping someone can point me in the right direction as I am lost as to where I am going wrong.
Best Answer chosen by Weber Sales Support
SarvaniSarvani
Hi Weber,

Can you please verify if your picklist field values for  'preferred location' and the 'street frontage'  are having correct API names in the formula.

Hope this helps! 

Thanks

All Answers

Weber Sales SupportWeber Sales Support
it seems to be the 'preferred location' and the 'street frontge' fields that are having the issues in that now all pick list options are applying the assigned score as per the formula. 
SarvaniSarvani
Hi Weber,

Can you please verify if your picklist field values for  'preferred location' and the 'street frontage'  are having correct API names in the formula.

Hope this helps! 

Thanks
This was selected as the best answer
Weber Sales SupportWeber Sales Support
Yes they are correct, in the case of the street frontage question it is assigning values to some of the pick list options but not others and I have copied and pasted the text directly from the field to the formula. Is there a maximum number of characters that could be interfering? I know some of our listed options are long winded. Kind Regards Ally Weber
SarvaniSarvani
Hi Weber,

I tried to replicate the issue with same picklist value and its working fine for me. It's not character issue as the custom values can take up to 255 characters. I doubt in the below points where its going wrong.

1. API Name, Please find the highlighted part of the image below as its confusing between actual value and API name. I hope you have the correct API names in your fomula.
User-added image
 2. Is your picklist value read correctly? To confirm please change your else values(default) to some randome value like 5000 for testing and see what is beign calculated for the selected picklist.

Example:
CASE( Prepared_to_Relocate__c , "Yes this is the preferred location", 10 ,"Not the Prefered Location see Dealer Review file for further information",100, 5000)
3. In case if its multi select picklist the formula should be changed.

Hope it helps!

Thanks
SarvaniSarvani
Hey Weber,

Also, your default picklist value on the picklist field can effect your result. If the default value is none thats fine but if you have some other value which is in the formula taking non-zero value as default it will be calculate based on that instead giving it "0".

Example: Picklist field -- Status 
Picklist values - Open, Closed,Working.
Default - Open (If checked)

Formula for calculation is 
CASE( Status , "Open" ,20, "Closed",10,"Working",30,0 )

Even if you select "None" in your picklist because you set your default value in the field level as Open it returns 20 instead of 0.

Thanks
Weber Sales SupportWeber Sales Support
Thanks Sarvani, that’s useful to know! I have found the issue in this particular case, there had been a slight change to the pick list selection that differed to the API for that selection. Thanks for your response Kind Regards Ally Weber
SarvaniSarvani

Sure, Glad !! you were able to figure out the issue. Please mark response as best answer so that thread will be closed. 

Good luck!

Thanks

king kobraking kobra
https://happy-birthday-wishes.mehttps://happy-birthday-wishes.me
Anthony SchneiderAnthony Schneider
Thank you Sarvani for the answer. It'll help me alot.
Download Instagram Photos (https://www.onlineresizeimage.com/download-instagram-photos/)
Download Instagram Video (https://www.onlineresizeimage.com/download-instagram-video/)