Skip to main content
I'm trying to build a formula that evaluates 2 date fields and 2 picklist fields. Below is what formula looks like so far but I keep getting a syntax error that stage name is a picklist field and only supported in certain functions and I'm not sure how to get around it. I was hoping to use contains because there's like 8 possible values that start with "new role" and I was hoping not to have to write out each one in the formula. 

 

OR(

 

Related_Coaching__r.Career_Coaching_Close_Date__c  >=  CloseDate  - 548,

 

AND(

 

CONTAINS (StageName, "New Role Found"), 

 

CONTAINS (Related_Coaching__r.Status__c, "Currently"))

 

)
3 risposte
  1. 1 ott 2018, 20:57
    Hi Kimberly,

     

    Assuming Status field on the Related Coaching is a text field, the formula will be as below.

     

    I am guessing the requirement is

     

    either if the Career Coaching Close Date is greater or equals to CloseDate - 548 days or if the Opportunity StageName begins with New Role  and Status on related coaching is Currently check the field to True

    OR(

    Related_Coaching__r.Career_Coaching_Close_Date__c >= (CloseDate - 548),

    AND(

    BEGINS(TEXT(StageName), "New Role Found"),

    CONTAINS(TEXT(Related_Coaching__r.Status__c), "Currently")

      )

    )

     

    If the Status field is a text field then replace

     

    CONTAINS(TEXT(Related_Coaching__r.Status__c), "Currently")

     

    with

     

    CONTAINS(Related_Coaching__r.Status__c, "Currently")
0/9000