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
Book_GuyBook_Guy 

Formula Too Big To Execute

Hi All,

 

Adding an "And" statement cause the formula field below to double in size.  I would like to learn more about how compiled field size is arrived at so I can attack this issue better.  Specifically would like to understand things like:

  • Does an "If" statement create a larger footprint then a case statement?
  • Does the length of the field name contribute to the field size?
  • Can bundling logic up into separate field help or hurt?
  • Can logic be sequenced to reduce the compiled field size?

The formula below works:

 

If( Prescreen__c = True,
1,
Case(Step_Counter__c,
0,0.5,
1, 0.5,
2,0.6,
3, 0.7,
4, 0.8,
5,0.9,
6, 1,
7, 1.1,
8, 1.1,
9, 1.1,
10, 1.1,
0.5))

 

Adding this And statement causes it to doubles in size to 10,012

If( AND(Prescreen__c = True,Step_Counter__c<7)

 

I'd appreciate any guidance on the above questions or a link to a document that can help.

 

Thank you.

 

--David

RpeeRpee

It sucks. 

 

Not answering all your questions because I don't really know the answers, but hopefully this helps...

 

Take a piece of the formula and add it into a field update for a workflow that fires every time the record is edited and saved. This will let you add 5k character compiled formulas together twice. It's not a great solution but it works. Be careful that you're not waiting for something to be written via workflow before any other workflow rules fire or you will get into a double-edit-save scenario which is not cool.

 

Have fun.