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
nkbk0108nkbk0108 

Help shortening formula

Hi
I've been brought in on a projectand have been tasked with creating a new formula field based on another formula field.
I need to use the field that is a result of this formula in another formula and I'm running into an error do the the number of characters. Can you somoene help me shorten this formula?
Thanks in advance.

Nancy

IF(CONTAINS( Segment_Label__c , '2'), DATE(YEAR( Order.Est_RevRec_St_Date_for_ord__c ) + 1, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF(CONTAINS( Segment_Label__c , '3'), DATE(YEAR(Order.Est_RevRec_St_Date_for_ord__c) + 2, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF(CONTAINS( Segment_Label__c , '4'), DATE(YEAR(Order.Est_RevRec_St_Date_for_ord__c) + 3, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF(CONTAINS( Segment_Label__c , '5'), DATE(YEAR(Order.Est_RevRec_St_Date_for_ord__c) + 4, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF( AND (OR(TEXT(Order.Opportunity.Type)= 'Renewal',TEXT(Order.SBQQ__Quote__r.SBQQ__Type__c)='Renewal') , TEXT(Delivery_Frequency__c) <> "One-Time" ), Order.Contract_Start_Date__c ,
TRAC_EstDate__c - DAY(TRAC_EstDate__c) +1 )))))

Alain CabonAlain Cabon
Hi,

IF(CONTAINS( Segment_Label__c , '2'),

... could be Segment_Label__c  = '2' ?
or  '2' , '3', '4' , '5' always at the same position in the field (end, beginning)?

The idea is to convert this number from Segment_Label__c into the number of years to add directly.