+ Start a Discussion

Need help on Custom Formula

I am trying to input the below code on Custom Formula, but getting Error.
CASE( Status ,
"Open - Not Contacted","Open - Not Contacted",
"Working - Contacted","Working - Contacted",
"Open- In Approval","Open- In Approval",
"Channel Deal Approved (Converted)", "Channel Deal Approved (Converted)",
"Closed - Converted","Closed - Converted",
"Closed - Not Converted","Closed - Not Converted",
"Closed - Not Converted","Closed - Not Converted",
"Ready to Convert","Ready to Convert",
Can any one help on the same?
Nathan CrosbyNathan Crosby
If this doesn't work can you send the error message. If Status is a custom field then the field name in the formula should be Status__c. Otherwise you may want to pass " " in place of null - can't seem to remember if returning null is considered valid for the CASE statement. If neither of these work, include the error message and some more detail to help us troubleshoot.
Barb Rheaume @ MTSBarb Rheaume @ MTS
I think you need to use the "ispickval" function inside your case statement.   I can't find the formula example of which I'm thinking.  This is a sample of a data validation rule using picklist values as tests.

Here's the description of the rule:
If the type is NOT Product Vendor, AND stage is Present Solution, Close-Won, or Negotiation, AND it's over 500K, AND system admin not updater, then sold cost must be completed. Only if oppty create date is >= 6/1/2007.

(OR(AND(YEAR( DATEVALUE( CreatedDate )) = 2007, MONTH( DATEVALUE( CreatedDate )) >= 6),
YEAR( DATEVALUE( CreatedDate )) >= 2008)),
($RecordType.Name = "Test_Sales_Rec"),
(NOT(ISPICKVAL($User.User_Type__c, "System Admin"))),
(OR(ISPICKVAL(StageName, "Present Solution"),
ISPICKVAL(StageName, "Negotiation"),
ISPICKVAL(StageName, "Closed-Won"))),
(NOT(ISPICKVAL(Type , "Product Vendor"))),
(Amount >= 500000),
(NULLVALUE(Soldmargin__c, 0) = 0)

Hope this helps.

Thx Barb.

I will try the code.