+ Start a Discussion
TShurah Palmer 3TShurah Palmer 3 

Formula error message regarding validation rule

I am trying to create a validation rule within a opportunity object after entering the formula per the Object Manager Challenge
ISPICKVAL( StageName ,"Closed Lost") && ISBLANK( Close_Reason__c ) .I Keep getting the following error:
 Error: Field Close_Reason__c is a picklist field. Picklist fields are only supported in certain function 
Trail head wont allow me to get past he challenge with out the above formula


 
Raj VakatiRaj Vakati
Try this
 
AND (
ISPICKVAL( StageName ,"Closed Lost") ,
ISBLANK( Text(Close_Reason__c ))
)

 
TShurah Palmer 3TShurah Palmer 3
Thank you, The formula works however the challenge  gives me the following error when verifying :

We couldn't find the correct formula for the validation rule 'Close reason required when lost'
TShurah Palmer 3TShurah Palmer 3
Thank you the formula works, however when I try to verify the challenge the following error appears:
We couldn't find the correct formula for the validation rule 'Close reason required when lost'
Raj VakatiRaj Vakati
try this
 
AND(
TEXT(StageName) = 'Closed Lost',
Amount > 50000,
ISBLANK(TEXT(Close_Reason__c))
)

 
TShurah Palmer 3TShurah Palmer 3
Thank you the formula you provided works, however the trailhead module keeps giving me the following error:
We couldn't find the correct formula for the validation rule 'Close reason required when lost'
Dr. Thomas MillerDr. Thomas Miller
I stumbled over the same problem. Finally I found out that in an earlier module, when creating the Close_Reason__c field, I accidentally created it as picklist instead of picklist(multiselect).
For multiselect picklist fields the formula ISPICKVAL( StageName ,"Closed Lost") && ISBLANK( Close_Reason__c )  is correct.
Rashmi ChandurajRashmi Chanduraj
Thank you Dr. Thomas Miller. I changed the field type to multiselect picklist and it worked!!