+ Start a Discussion
xpatxpat 

1 seems to be a too big formula Bug???

Hi,
 
I built a formula July 8 2008, when I want to modify it always gives me an error "Compiled formula is too big"
 
so I decide to modify it with:
 
formula__c = 1 
No syntax errors in merge fields or functions. (Compiled size: 1 characters)
 
and when I try to save I get this error message
 
Referring Formula: Compiled formula is too big to execute (6.506 characters). Maximum size is 5.000 characters
 
Is someone has a solution cause I become crazy?
 
Thanks
 
Pat
 
 
ckellieckellie
your formula__c field is the issue. That formula is too big for the new field.
xpatxpat

Formula__c is the name of my custom formula field that I built in July and want to modify.

when I replace my formula by 1 I get the error message

 

 

ckellieckellie
remove Formula__c. If the error goes away, the problem is with formula__c, if not. You might have better luck deleting this field and starting from scratch.
xpatxpat

Always get the error.

If I create a new field all is ok, so if the reason I said it's a bug.

The problem is this field is used in other formula that have the same bug and I will need to recreate all my fields and then replace them in my workflow before to delete, mainly i need to redo all the process...

I sent a ticket and the answer was formula size can't be more than 5000 (I already knew that) and create an idea. Should I put in my idea, SFDC need to fix the bug? :)

 

ckellieckellie
When a formula field pulls another formula field, the new formula is both formula fields. In order to get around this, you need to break the formulas up with a static text or number field using workflow and validation rules. That is the only way to remedy your problem.
xpatxpat

Yes I know that. but in this case my problem is different.

this the new formula field I create on Dec 6

if( Contains( Name , "Case Pack - 5"), 5,
if(Contains( Name , "Case Pack - 10"), 10,
if(Contains( Name , "Case Pack - 20"), 20,
if(Contains( Name , "Case Pack - 40"), 40,
if(Contains( Name , "Case Pack - 30"), 30,
if(Contains( Name , "Case Pack - 80"), 80,0))))))

(Compiled size: 727 characters)

this is the one I created in July and that I wanted to modify, add value for Case pack 30

if( Contains( Name , "Case Pack - 5"), 5,
if(Contains( Name , "Case Pack - 10"), 10,
if(Contains( Name , "Case Pack - 20"), 20,
if(Contains( Name , "Case Pack - 40"), 40,
if(Contains( Name , "Case Pack - 80"), 80,0)))))

(Compiled size: 602 characters)

when I add if(Contains( Name , "Case Pack - 30"), 30,

and want to save I get error message

Error: Invalid Data.
Review all error messages below to correct your data.
Referring Formula: Compiled formula is too big to execute (5.097 characters). Maximum size is 5.000 characters

So same formula, same compiled size when you check the syntax I can save the new one without issue and for the old one give me a size of 5097 characters.

ckellieckellie
Chances are there are blank spaces/characters after the formula. Other than that, I am not sure what to do. If you are editing a field, create the new field and move on. That is what I would do.
xpatxpat

I tried all solutions, remove all and just put 1 and I got the same message :(  I removed all the space, delete all and copy and past ... but same message ...

I reopen the ticket will see what they will answer.