Hi friends i have formul ain custom object and i am try to group based on a number field.But i am gettig error like ,

Please help my validation rule.

IF(Net_Promoter_Score__c < 7, "Detractor"), IF(Net_Promoter_Score__c > 8, 
                                                "Promoter"), "Passive"))

I'm getting error like

Error: Syntax error. Extra ','


You misplaced some parentheses, which confused the compiler. Here's the correct version:

IF(Net_Promoter_Score__c < 7, "Detractor", 
  IF(Net_Promoter_Score__c > 8, "Promoter", "Passive"))

Generally speaking, if you have a different number of ( and ) in a formula, then you have a mistake somewhere. In your original formula, you had 2 ( and 4 ), which was incorrect.

If statements are in the form IF(Condition, TrueValue, FalseValue). When you need to chain them together, they take place of the TrueValue/FalseValue places, like this:

  If(Condition, TrueValue, FalseValue), 
  If(Condition, TrueValue, FalseValue)

Just remember that the left and right parentheses should always match.

| improve this answer | |

Try this,

IF(Net_Promoter_Score__c < 7, "Detractor",IF(Net_Promoter_Score__c > 8,"Promoter","Passive"))
| 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.