You need to sign in to do that
Don't have an account?
Bryan Leaman 6
Formula to show picklist text (not value!) on a related object
I leveraged the new-ish feature of picklists that lets me have a value that is displayed and a code that is stored in the object record and they're different. However, now I'd like to show the picklist value (not the code) on a related object, but the only thing I can find is to do TEXT(object__r.picklistfield__c), which always returns the code, not the value.
For example, if my picklist (Customer_class__c) had values defined as:
Value API Name
Enterprise Customer CC1
Business Customer CC2
Then from a related record, a formula TEXT(Account.Customer_class__c) will show "CC1" and I want to show "Enterprise Customer".
Any ideas? So far all I've come up with is to put a case statement in the formula:
CASE(TEXT(Account.Customer_class__c),
'CC1', 'Enterprise Customer',
'CC2', 'Business Customer',
... etc...
'Unrecognized code')
For example, if my picklist (Customer_class__c) had values defined as:
Value API Name
Enterprise Customer CC1
Business Customer CC2
Then from a related record, a formula TEXT(Account.Customer_class__c) will show "CC1" and I want to show "Enterprise Customer".
Any ideas? So far all I've come up with is to put a case statement in the formula:
CASE(TEXT(Account.Customer_class__c),
'CC1', 'Enterprise Customer',
'CC2', 'Business Customer',
... etc...
'Unrecognized code')
Right now, it is not possible.
Please upvote the below idea. Once we got the sufficient votes then it will be implemented in the future releases.
https://ideas.salesforce.com/s/idea/a0B8W00000GdpRbUAJ/allow-picklist-value-labels-in-formulas
If this information helps, Please mark it as best answer for future rferences.
Thanks!!
All Answers
I have tried with below formula, its working for me.
Refere the below screenshot for your reference.
If this helps, Please mark it as best answer.
Thanks!!
I'm looking for a way to do it without having to replicate my picklist values in the formula field.
Right now, it is not possible.
Please upvote the below idea. Once we got the sufficient votes then it will be implemented in the future releases.
https://ideas.salesforce.com/s/idea/a0B8W00000GdpRbUAJ/allow-picklist-value-labels-in-formulas
If this information helps, Please mark it as best answer for future rferences.
Thanks!!