function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Emilee Crocker 3Emilee Crocker 3 

Syntax Error ')'

I have the following to set for a workflow but I keep getting a Syntax error, Missing ')' and I cannot figure out what I am doing wrong.
This is my code:
IF(Sales_Potential_Price_Class__c = 01, Price_Class = "Class 1", IF(Sales_Potential_Price_Class__c = 02, Price_Class = "Class 2", IF(Sales_Potential_Price_Class__c = 03, Price_Class = "Class 3", IF(Sales_Potential_Price_Class__c = 04, Price_Class = "Class 4", IF(Sales_Potential_Price_Class__c = 05, Price_Class = "Class 5", IF(Sales_Potential_Price_Class__c = 06, Price_Class = "Class 6", IF(Sales_Potential_Price_Class__c = other, Price_Class = "other", IF(Sales_Potential_Price_Class__c = 97, Price_Class = "Class 97", IF(Sales_Potential_Price_Class__c = 98, Price_Class = "Class 98", IF(Sales_Potential_Price_Class__c = 99, Price_Class = "Class 99"
Shawn Reichner 29Shawn Reichner 29
Try the following, looks like you are missing your closing ) for all of your IF Statements. 

IF(Sales_Potential_Price_Class__c = 01, Price_Class = "Class 1", IF(Sales_Potential_Price_Class__c = 02, Price_Class = "Class 2", IF(Sales_Potential_Price_Class__c = 03, Price_Class = "Class 3", IF(Sales_Potential_Price_Class__c = 04, Price_Class = "Class 4", IF(Sales_Potential_Price_Class__c = 05, Price_Class = "Class 5", IF(Sales_Potential_Price_Class__c = 06, Price_Class = "Class 6", IF(Sales_Potential_Price_Class__c = other, Price_Class = "other", IF(Sales_Potential_Price_Class__c = 97, Price_Class = "Class 97", IF(Sales_Potential_Price_Class__c = 98, Price_Class = "Class 98", IF(Sales_Potential_Price_Class__c = 99, Price_Class = "Class 99"
))))))))))
Emilee Crocker 3Emilee Crocker 3
I tried that and it came up with another error - Incorrect parameter type for operator '='. Expected Text, received Number
Shawn Reichner 29Shawn Reichner 29
Is your Price Class field a text field for its type?
Emilee Crocker 3Emilee Crocker 3
The Price Class field is a picklist