1

Two fields are available in account object

I have the Picklist datatype Value in one field called custom__c

Picklist Values are:

atom, molecule, organic, inorganic

I have created the another formula field called custom1__c with return type as text

if i create the record in the object

if i choose the value atom in custom__c field another field called custom1__c it should populate the small value in that field

like wise

if i choose

atom- small, molecule - big, organic - material, inorganic - nonmaterial

should automatically populate in the custom1__c field, can you guide me the answer what is the formula i have to write when creating the field called as custom1__c as formula for populating the values

1
  • In your custom1 formula text field, you can use CASE function on the custom picklist field and return the corresponding values Nov 22, 2016 at 11:17

2 Answers 2

4

Using the below formula in the custom formula field custom1__c

CASE(custom__c, 
"atom", "small", 
"molecule", "big", 
"organic", "material", 
"inorganic", "nonmaterial",
"" 
)
1
  • To add to this answer, you normally need to use TEXT() or ISPICKVAL() to work with a picklist field. However, the CASE() formula function is special, and you can use a picklist field directly if it's the first argument (as it is in this case).
    – Derek F
    Nov 22, 2016 at 16:01
1

You can write your formula something like

if(Text(custom__c) == 'atom', 'small', if(Text(custom__c) == 'molecule', 'big',if(...)))

But just FYI formula have 5000 characters limits. So for small values it will works for large value you can create a text field and populate that using trigger.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.