0

been going around on this. Can anybody spot whats the issue? I'm just trying to get a validation rule to work. Basically, if someone select a certain option in a picklist, I want to make sure that all the fields are populated.

I've tried a couple ways but I've gotten snagged on the

Error: Field StageName is a picklist field. Picklist fields are only supported in certain functions.

I'll try to use the functions that are recommended in the documentation but I'll run into errors with that too. Can anyone spot the issue?

INCLUDES( StageName, "Final Proposal",
OR(
ISBLANK( Geography__c ),
ISBLANK( Languages__c ),
ISBLANK( Customer_Base__c ),
ISBLANK( Number_of_Agents__c ),
ISBLANK( Additional_Resources_Required__c ),
ISBLANK(  Program_Length_In_Months__c  ),
ISPICKVAL(  CRM_List_Requirements__c , 'N3 Provides'),
ISPICKVAL(  CRM_List_Requirements__c , 'Client Provided '),
ISPICKVAL(  Proposed_Commitments__c, 'KPI' ),
ISPICKVAL(  Proposed_Commitments__c, 'Metrics' ),
ISPICKVAL(  Proposed_Commitments__c, 'Results' ),
ISBLANK(  Non_Standard_Program__c  )
))
2

Can you try this one:

AND(
    ISPICKVAL( StageName, "Final Proposal"),
    OR(
        ISBLANK( Geography__c ),
        ISBLANK( Languages__c ),
        ISBLANK( Customer_Base__c ),
        ISBLANK( Number_of_Agents__c ),
        ISBLANK( Additional_Resources_Required__c ),
        ISBLANK(  Program_Length_In_Months__c  ),
        ISPICKVAL(  CRM_List_Requirements__c , 'N3 Provides'),
        ISPICKVAL(  CRM_List_Requirements__c , 'Client Provided '),
        ISPICKVAL(  Proposed_Commitments__c, 'KPI' ),
        ISPICKVAL(  Proposed_Commitments__c, 'Metrics' ),
        ISPICKVAL(  Proposed_Commitments__c, 'Results' ),
        ISBLANK(  Non_Standard_Program__c  )
    )
)

Picklists should be used with ISPICKVAL function to check it's value unless it is not a multi-select picklist.

1

You should use TEXT(StageName) to retrieve string value out of the Picklist.

Try this:

INCLUDES( TEXT(StageName), "Final Proposal", 
OR( ISBLANK( Geography__c ), ISBLANK( Languages__c ), 
ISBLANK( Customer_Base__c ), ISBLANK( Number_of_Agents__c ), 
ISBLANK( Additional_Resources_Required__c ), 
ISBLANK( Program_Length_In_Months__c ), 
ISPICKVAL( CRM_List_Requirements__c , 'N3 Provides'), 
ISPICKVAL( CRM_List_Requirements__c , 'Client Provided '), 
ISPICKVAL( Proposed_Commitments__c, 'KPI' ), 
ISPICKVAL( Proposed_Commitments__c, 'Metrics' ), 
ISPICKVAL( Proposed_Commitments__c, 'Results' ), 
ISBLANK( Non_Standard_Program__c ) ))

Ref:

https://success.salesforce.com/ideaView?id=08730000000Bq9SAAS

1

The reason for your error is that INCLUDES is used on multiselect picklists and Opportunity.stagename is a simple picklist

ISPICKVAL(Stagename,"Final Proposal") , 
...

If you need to check StageName against multiple values

  OR(ISPICKVAL(StageName,"val1"),
     ISPICKVAL(StageName,"val2")
     ...
 )

or sometimes, CASE is needed because it uses less formula compiled characters

IF ("1" = CASE(StageName,
               "Val1","1",
               "Val2","1",
               "0") &&
... next condition ...
1

StageName is picklist field and when we compare picklist field to a value then we need to use "ISPICKVAL()" function.

ISPICKVAL(StageName,"abc")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.