IF( AND(ISPICKVAL(Country__c, "USA"), ISPICKVAL(USC_Type__c, "US - DoD/VA")) ,
Report_Classification_B__r.Report_Classification_Code_DoD__c ,
IF ( AND(ISPICKVAL(Country__c, "USA"), ISPICKVAL(USC_Type__c, "US - Vizient")) ,
Report_Classification_B__r.Report_Classification_Code_Vizient__c ,
The above works but the moment I added the below to it, it triggered the error message
IF( AND(ISPICKVAL(Country__c, "USA"), ISPICKVAL(USC_Type__c, "US - Other")) ,
Report_Classification_B__r.Report_Classification_Code_US_Other__c ))
Not sure what the problem is - your help is much appreciated
No problem - it's just that you forgot to replace both of the empty string instances with the default value. Let's try this:
IF (ISPICKVAL(Country__c, "USA"),
CASE(USC_Type__c,
"US - DoD/VA", Report_Classification_B__r.Report_Classification_Code_DoD__c,
"US - Vizient", Report_Classification_B__r.Report_Classification_Code_Vizient__c,
"US - Other", Report_Classification_B__r.Report_Classification_Code_US_Other__c,
Text(Report_Classification_B__r.Report_Classification_Code__c)
),
Text(Report_Classification_B__r.Report_Classification_Code__c)
)
The first one is for everyone in the USA with an unknown USC type, and the other is for everyone outside the USA. I know you'd only need to have it once if you had used an IF, but in terms of the performance required to calculate the formula, this is more efficient.