If I have the object Animal__cwith the fieldsColor__c and Shape__c. How Can I make a conditional formula field Country__c which is dependent of the values ofColor__c. Example:

    If (Color__c ='Blue'){
        Country__c = 'Germany';
    }else if(Color__c ='Red'){
        Country__c = 'France';
      Country__c = 'Italy';

How Can I do that in the Lightning console??

  • 4
    What do you mean, exactly, the Lightning Console? What are you trying to use? A formula field? JavaScript? Apex? Something else? – sfdcfox Feb 3 at 16:01
  • A formula field as stated in the post – Mar Andrés López Feb 3 at 17:42

You could also try a nested if statement IF(Color__c = 'Blue', Country__c = 'Germany', IF(Color__c = 'Red', Country__c = 'France'....etc

But it looks like a case statement is the way to go.

| improve this answer | |

if you just need a formula field then you can try this-

CASE( Color__c , 'Red', 'France', 'Blue', 'Germany','Italy')
| improve this answer | |

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.