• Satish Kumar Osuri
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I have 2 fields Source_System__c (Picklist) and  Currency__c (Text) fields. I need to write a formula for the below condition.
I created a formula field formula_value.

if(source system == abc) && (currency == 1) then formula_value= x1
if(source system == abc) && (currency == 2) then formula_value= x2 and so on.

I wrote a formula as below which is repeating ISPICKVAL( Source_System__c, "abc"). 
 
IF((ISPICKVAL( Source_System__c, "abc")) && (Currency__c == 'Afghanistan Afghani'),"AFN",
IF((ISPICKVAL( Source_System__c, "abc")) && (Currency__c == 'Albanian Lek'),"ALL",
"NULL"))

Can anyone optimise the above formula by using picklist value only once. I need to check like this for 20 times.
I have 2 fields Source_System__c (Picklist) and  Currency__c (Text) fields. I need to write a formula for the below condition.
I created a formula field formula_value.

if(source system == abc) && (currency == 1) then formula_value= x1
if(source system == abc) && (currency == 2) then formula_value= x2 and so on.

I wrote a formula as below which is repeating ISPICKVAL( Source_System__c, "abc"). 
 
IF((ISPICKVAL( Source_System__c, "abc")) && (Currency__c == 'Afghanistan Afghani'),"AFN",
IF((ISPICKVAL( Source_System__c, "abc")) && (Currency__c == 'Albanian Lek'),"ALL",
"NULL"))

Can anyone optimise the above formula by using picklist value only once. I need to check like this for 20 times.