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
RDM1961RDM1961 

Compiled formula too long

Any thoughts on how I could shorten this code?  Currently compiles at about 15,000 charactors.

Thanks,

Rick

 

 

IF(AND(Implant_Date__c > Patient__r.Implanting_Center__r.Last_JC_Cert_Date__c ,
                 OR(CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'A'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'B'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'C'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'D'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'E'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'F'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'G'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'H'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'I'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'J'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'K'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'L'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'M'),
                        CONTAINS(Text(LVAD_Model__c)  &  ' ' & Text(RVAD_Model__c), 'N')
                         )
                  ),1,0
       )

 

_Prasu__Prasu_

I think its due the fields which are using in this formula fields are also formula field in itself. In such scenrio you will require to write a before insert trigger.