Skip to main content

Hi!  My weakness is formulas and I am trying to add another record type to this formula called International Trade.  I have tried everything I could think of possible and keep receiving Syntax errors.  Any assistance would be appreciated. 

 

Data Type | Formula |   |  

 

IF(AND(RecordType.Name = 'BA/BE',ISPICKVAL(Opportunity_Industry__c, '')= false),IF(OR(ISPICKVAL(Opportunity_Industry__c, 'Aerospace & Defense')),'Aerospace & Defense',IF(OR(ISPICKVAL(Opportunity_Industry__c, 'Bioscience & Biotechnology........

6 answers
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    Aug 4, 2023, 4:50 PM

    Ok, can you try this:

    IF(AND(CASE(RecordType.Name,'BA/BE',1,'International Trade',1,0)=1,NOT(ISBLANK(TEXT(Opportunity_Industry__c)))),

    CASE(

    CASE(Opportunity_Industry__c,, 'Aerospace & Defense',1,'Bioscience & Biotechnology',2,'Cannabis Products',2,'Healthcare',2,'MedTech',2,'Pharmaceutical',2,

    'Banking, Finance & Insurance',3,'Business Support Services',3,'FinTech',3,'Real Estate',3,

    'Arts, Entertainment & Recreation',4,'Automotive',4,'Consumer Products',4,'Consumer Services',4,'Food & Beverage',4,'Educational Services',4,'Industrial',4,'Retail',4,'Construction',4,

    'Warehousing & Distribution',5,'Transportation & Logistics',5,

    'Agriculture, Forestry, Fishing & Hunting',6,'Natural Resources & Mining',6,'Oil & Gas',6,

    'Battery Technology',7,'CyberSecurity',7,'Information Technology & Software',7,'Optics & Photonics',7,'PropTech',7,'Renewable Energy',7,'Semiconductors',7,'Telecommunications',7,0),

    1,'Aerospace & Defense',

    2,'Bioscience & Health Care',

    3,'Business & Financial Services',

    4,'Consumer Products & Services',

    5,'Logistics',

    6,'Natural Resources',

    7,'Technology & Innovation',

    'Other'),NULL)

    Slightly easier to read.

    All I did was use a CASE function to give a numerical value to each of your Opportunity_Industry__c picklist values

    Then I have another CASE surrounding that to give each one of my numerical values the results you had in each IF statement

0/9000