1
IF(
  AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Enhancement'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QozEAE',
  AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Internal Bug'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QrPEAU',
  AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Product Bug'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QrUEAU',
  AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Questions'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QrZEAU',"")
  • Put the business rule what you are trying to achieve? – Santanu Boral Jan 22 '18 at 3:20
4

You need to use "nested if statements".

IF(
  AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Enhancement'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QozEAE',
  IF(AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Internal Bug'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QrPEAU',
  IF(AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Product Bug'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QrUEAU',
  IF(AND(
    ISPICKVAL([Bug__c].Bug_Classification__c,'Questions'),
    [Bug__c].RecordType.Name ='PDK Bug'
  ),'a8I0l0000008QrZEAU',""))))

Each IF statement must have three parameters:

IF(BooleanValue, ValueWhenTrue, ValueWhenFalse)

By the way, you could make this a lot less "ugly" by shuffling some code around:

IF(
  [Bug__c].RecordType.Name ='PDK Bug',
  CASE([Bug__c].Bug_Classification__c,
    'Enhancement', 'a8I0l0000008QozEAE',
    'Internal Bug', 'a8I0l0000008QrPEAU',
    'Product Bug', 'a8I0l0000008QrUEAU',
    'Questions', 'a8I0l0000008QrZEAU',
    "")
  "")
  • Are the square brackets surrounding Bug__c really valid syntax? – Derek F Jan 22 '18 at 3:21
  • 1
    @DerekF It is for Process Builder and Flow formulas. – sfdcfox Jan 22 '18 at 3:23
  • @DerekF I suspect the OP is mis-tagged as validation-rule, since it doesn't return a true/false value. – sfdcfox Jan 22 '18 at 3:24

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.