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
laxmi narayan 11laxmi narayan 11 

Validation rule showing error "Field Membership_Level__c is a picklist field. Picklist fields are only supported in certain functions"

Hi there,

I have Picklist field Membership_Level__c which have some values like Child Free and another picklist field Membership_Type__c which also have some value like GP and Dental.

Add a validation rule not to allow to add Free Child to GP and Dental.
I did this:
IF(AND(ISPICKVAL(Membership_Type__c,'MHC GP'), 
NOT(ISBLANK(Membership_Level__c,'Child Free'))), true, false)

Please assist
LN
Karthikeyan Rajendran 14Karthikeyan Rajendran 14
Hi Lakshmi Narayan

    Use the following to resolve your issue.

    IF(AND(ISPICKVAL(Membership_Type__c, 'MHC GP'),
        NOT(ISBLANK(TEXT(Membership_Level__c))),ISPICKVAL(Status,'New')),TRUE,FALSE)

Regards
Karthik
    
Sunil RathoreSunil Rathore
Hi Laxmi Narayan,

Use the below formula:
 IF(AND(ISPICKVAL(Membership_Type__c, 'MHC GP'),
        NOT(ISBLANK(TEXT(Membership_Level__c))),ISPICKVAL(Membership_Level__c ,'Child Free')),TRUE,FALSE)

Let me know if it solves your problem.

Many Thanks,
Sunil Rathore
Alok Singh 140Alok Singh 140
HI use this code 
IF(AND(ISPICKVAL(Membership_Type__c,'MHC GP'), 
NOT(ISCHANGED(Membership_Level__c,'Child Free'))), true, false)
Let me know if it solves your problem.

Thanks,
Alok Singh
laxmi narayan 11laxmi narayan 11
Hi all,
 Thanks for your answers.

this is work for Membership_Type__c,'MHC GP'. if I want to add one more picklist value in this it does not work.
I did this:

IF(AND(ISPICKVAL(Membership_Type__c, 'MHC GP'),ISPICKVAL(Membership_Type__c, 'MHC Dental'),
NOT(ISBLANK(TEXT(Membership_Level__c))),ISPICKVAL(Membership_Level__c ,'Child Free')),TRUE,FALSE)

This is not working for me.

Thanks in advance
LN