0

I am trying to merge some field values using formula field but its hitting the limit.

Compiled formula is too big to execute (5,016 characters). Maximum size is 5,000 characters

each fields are formula field in itself, which again references some other fields

  • I understand that's the reason, but is there a way to shorten below code? I am not sure if CASE would help here.
IF(ISBLANK(Classification_ANF_formula_GILD_E__c),'',
Classification_ANF_formula_GILD_E__c & ' ; ' )
&
IF(ISBLANK(Classification_CF_formula_GILD_E__c),'',
Classification_CF_formula_GILD_E__c & ' ; ' )
&
IF(ISBLANK(Classification_HBV_formula_GILD_E__c),'',
Classification_HBV_formula_GILD_E__c & ' ; ' )
&
IF(ISBLANK(Classification_HCV_formula_GILD_E__c),'',
Classification_HCV_formula_GILD_E__c & ' ; ' )
&
IF(ISBLANK(Classification_ONC_formula_GILD_E__c),'',
Classification_ONC_formula_GILD_E__c & ' ; ' )
&
IF(ISBLANK(Classification_HIV_formula_GILD_E__c),'',
Classification_HIV_formula_GILD_E__c & ' ; ' )
& 
IF(ISBLANK(Classification_CT_formula_GILD__c),'', 
Classification_CT_formula_GILD__c )
&
IF(ISBLANK(Classification_INF_formula_GILD_E__c),'',
Classification_INF_formula_GILD_E__c & ' ; ' )
6
  • 2
    What are the compiled cost of each formula function would be a good reference for you. – Derek F Oct 21 '20 at 15:15
  • This looks too small to hit 5k. Are each of these fields a formula in itself? – manjit5190 Oct 21 '20 at 15:30
  • Or may be at least one field is a Long Textarea field? – Austin Evans Oct 21 '20 at 15:38
  • Manjith - each fields mentioned here are formula fields itself, which again reference another text field.. I cant go with workflow update option either. – Vignesh Waran Oct 21 '20 at 15:48
  • well, you can get rid of at least one if... i think you may have mixed the order of Classification_CT_formula_GILD__c and Classification_INF_formula_GILD_E__c, but the one that doesn't have to have the ' ; ' concatenated does not need the surrounding if statement. – Vincent Ip Oct 21 '20 at 17:24

Your Answer

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

Browse other questions tagged or ask your own question.