+ Start a Discussion
ETadminETadmin 

Too big to execute?!

I tried to validate this and I got: Error: Compiled formula is too big to execute (31,974 characters). Maximum size is 4,000 characters - what is the character count based on? Any ideas on how to run this more efficiently?
 
 
 
CASE(X6_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c + X4_Payment_Amount__c + X5_Payment_Amount__c + X6_Payment_Amount__c),CASE(X5_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c + X4_Payment_Amount__c + X5_Payment_Amount__c),CASE(X4_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c + X4_Payment_Amount__c),CASE(X3_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c),CASE(X2_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c),CASE(X1_Payment_Status__c,"Collected",X1_Payment_Amount__c,null))))))
cpierrecpierre

I believe character count includes spaces. You can break up large formulas into 2 or more reference formulas.

For example I have a 7000 character formula.  I will create RefFormula 1 with half and RefFormula 2 with the other half (guestimating - I don't actually count).  These are hidden in page layout

Then the visable Formula field would look something like -

  
IF(ISNULL(RefFormula_1__c),RefFormula_2__c,RefFormula_1__c&RefFormula__c)

 

The formula I created references the other two.  Hope that makes sense

 

 

 

KaushikKaushik

Hi

I  too have the same problem.I have tried to reference one formula field in another formula field ,but it is giving the same error.I think it is including the code of the referenced formula field while compiling,

Thanks

Kaushik

KaushikKaushik

Hi

I  too have the same problem.I have tried to reference one formula field in another formula field ,but it is giving the same error.I think it is including the code of the referenced formula field while compiling,

In addition to the above problem,Is there any way to change the standard fields?

Thanks

Kaushik

ETadminETadmin

Thanks, Kaushik.

I tried that, but the count includes rendering the referred fields so it was still too big. I had to change some of the formala fields to standard fields (tough luck for the user) and I am looking into an S-control to automate what the formula was doing. 4K is WAY too small a limit for the formula fields!!

KaushikKaushik

Hi

I too agree.The 4K limit is less.

But you could , try using the update fields option in the work-flows.The good thing about it is that, one could use many formulae on one field

Thanks

a contratora contrator

Hi , I got the same issue.  Did any one get or offer the solution ?   Thanks.

 

There may be a couple of ways instead of using this 'big' formula:

(1) break into 2 or more formula fields

(2) using a regular field and get the value from a trigger

 

However,  can we use the formula without the limitation ?