Skip to main content
Hello

 

I have below formula that I need to update since its now not anymore the product family value "Services" that is valid but I need to replace it with the following values, it can be either one of them so it must be an OR formula:

 

Rollout Services

 

Continuity Services

 

Education

 

Innovation Services

 

instead of the "Services" (see formula below)

 

Many thanks for your help.

 

IF(NOT(

 

 

 

ISPICKVAL( PricebookEntry.Product2.Family ,"Services" )) &&(YEAR(Valid_to__c)= YEAR(Valid_from__c)),TotalPrice ,

 

IF

 

(

 

 

 

NOT(

 

 

 

ISPICKVAL( PricebookEntry.Product2.Family ,"Services" )) && NOT(ISBLANK( Valid_to__c )) && NOT(ISBLANK( Valid_from__c ) ),

 

 

 

(TotalPrice / ROUND((( Valid_to__c - Valid_from__c )/365),1)

 

 

 

 

 

),

 

IF

 

 

 

(

 

 

 

NOT(

 

 

 

ISPICKVAL( PricebookEntry.Product2.Family ,"Services" )) && ISBLANK( Valid_to__c ) && ISBLANK( Valid_from__c ) ,

 

 

 

(TotalPrice / ROUND (((Opportunity.Valid_to_Platform__c - Opportunity.Valid_from_Platform__c) / 365),1)),0

 

 

 

 

 

)

 

)

 

 

 

 

 

)

 

 
6 respuestas
  1. 24 ene 2019, 13:43
    Hi Philipp,

     

    You can use the formula that I have posted, thats the optimised version.

     

    In your previous formula, you are repeating the below line of code thrice

     

    NOT(ISPICKVAL( PricebookEntry.Product2.Family ,"Services" )) 

     

    while there is nothing wrong with that but it is not an efficient formula and other than that formula fields have size and compilation limits, your formula is ok for now but imaging you had to exclude 10 other values then you may hit the limits.

     

    Anyways, if you want to use the formula as you had it previous, the formula will be as below

     

     

    IF(

    NOT(

    OR(

    ISPICKVAL( PricebookEntry.Product2.Family ,"Rollout Services"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Continuity Services"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Education"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Innovation Services")

    )

    )&&(YEAR(Valid_to__c)= YEAR(Valid_from__c)),TotalPrice ,

    IF

    (

    NOT(

    OR(

    ISPICKVAL( PricebookEntry.Product2.Family ,"Rollout Services"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Continuity Services"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Education"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Innovation Services")

    ))&& NOT(ISBLANK( Valid_to__c )) && NOT(ISBLANK( Valid_from__c ) ),

    (TotalPrice / ROUND((( Valid_to__c - Valid_from__c )/365),1)

    ),

    IF

    (

    NOT(

    OR(

    ISPICKVAL( PricebookEntry.Product2.Family ,"Rollout Services"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Continuity Services"),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Education" ),

    ISPICKVAL( PricebookEntry.Product2.Family ,"Innovation Services")

    )) && ISBLANK( Valid_to__c ) && ISBLANK( Valid_from__c ) ,

    (TotalPrice / ROUND (((Opportunity.Valid_to_Platform__c - Opportunity.Valid_from_Platform__c) / 365),1)),0

    )

    )

    )

     

     
0/9000