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
Rajasekhar Reddy Neerugatti 14Rajasekhar Reddy Neerugatti 14 

Error: Field Close_Reason__c is a picklist field. Picklist fields are only supported in certain functions. While creating validation rules for Oppertunity

I am facing above error while creating formula in validaion rules for oppertunity.
Deanne Walters 6Deanne Walters 6
Can you post the validation rule you tried and what you are trying to do?
Maharajan CMaharajan C
Hi,

Use TEXT() to avoid this error.

Syntax:

TEXT(PicklistField)

Example:

TEXT(Close_Reason__c)

==============

To check the particulae value use the below:
TEXT(ISPICKVAL(Close_Reason__c, "Resolved")

To chack the field is Blank:
ISBLANK(TEXT(Close_Reason__c))


Thanks,
Maharajan.C

 
Rajasekhar Reddy Neerugatti 14Rajasekhar Reddy Neerugatti 14
@Deanne Walters 6, Here is my validation rule --> ISPICKVAL( StageName ,"Closed Lost") && ISBLANK( Close_Reason__c )
 
Rajasekhar Reddy Neerugatti 14Rajasekhar Reddy Neerugatti 14
@Maharajan C,

I tried this --> ISBLANK(TEXT(Close_Reason__c)) but Module is not verifying. Please see below error.and help me complete the module.

"Step not yet complete in ********@gmail.com
We couldn't find the correct formula for the validation rule 'Close reason required when lost'."
Rajasekhar Reddy Neerugatti 14Rajasekhar Reddy Neerugatti 14
ISPICKVAL( StageName ,"Closed Lost") && ISBLANK( Text(Close_Reason__c) )
Steven Price 12Steven Price 12

Hi Rajasekhar, 

I was having the exact same issue you had when working on this module. I found a work around that solved the issue for me. 

First, I launched a different demo environment than the one I had been working in. Then, I had to manually add the fields Has Support Plan (checkbox) and Support Plan Expiration Date (date) to the Account object. I then added the Account validation rule and had no issues. 

Then, I added the Close Reason field to the Opportunity object. However, please NOTE: Instead of making this field a picklist type I made it a text field. Then I created the Opportunity validation rule and had no issues. 

I was able to complete the module successfully. 

For some reason, the formula always returned an error for me whlen I checked syntax as long as the Close Reason field was a picklist field type. Once I created it in a different org with the text field type that syntax error stopped occurring and I completed the exercise successfully. 

Juan Pablo BenaventeJuan Pablo Benavente
Hi, I had the same error, and it was because in the exercise "Create Picklists and Field Dependencies" they ask you to put a "Picklist (Multi-Select)", I put a Picklist so it showed me an error in the formula, I changed the field type and I was able to finish and validate.
Phil Alonso 8Phil Alonso 8
Thanks, Juan Pablo! I missed the direction to create the field as a "Picklist (Multi-Select)" initially, which threw the error. When I edited the field type and saved, the syntax checked out, and I was able to complete the exercise. 
ARVIND KUMAR 291ARVIND KUMAR 291

Hi All,

Solution is very simple,

Simply change the Close_reason__c field's data type to Text. You don't need to worry about the picklist values, since this is the last hands-on of the module.

Error will go off. Worked for me.

Regards,

Arvind Kumar

Harshit BATRAHarshit BATRA
Hi,
If you getting this issue ""syntax error: Error: Field Closed_Reason__c does not exist""
here is the solution
got to fields and relationship and then go to close relation edit it edit its field make it picklist(multvalue) and set value 6 then this problem will be rectified
Thanks