I have a Formula Field(Time_Spent_Technology_Setup_Number__c) to stop calculating time based on the Status. Whenever i am trying to save the field it is throwing below error: (In the logic I am not referencing any formula fields, I am using only Date fields)

Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,459 characters). Maximum size is 5,000 characters (Related field: Formula)

Here is my Logic :

if (or(ISPICKVAL(Status__c ,'Cancelled'),DateAssignedBusiness__c=null),null,
if (not isnull(DateAssigned_ThirdParty__c),DateAssigned_ThirdParty__c- DateAssignedBusiness__c,
if (not isnull(DateAssigned_Technology__c),DateAssigned_Technology__c - DateAssignedBusiness__c,
if (ISPICKVAL(Status__c ,'Closed'),Closed_Date__c - DateAssignedBusiness__c,
Now()- DateAssignedBusiness__c))))

Can anyone please help me on how to minimise my formula?

  • Are you using this formula field else where in a different formula? Jan 4, 2019 at 20:17
  • @codeyinthecloud Yes I am using that in other formula field. I updated that in the Question.
    – Learner
    Jan 4, 2019 at 20:26
  • 1 thing that I note is that the need for your first condition in 1st formula is negated by the 1st condition in the 2nd formula (possibly?) [if (or(ISPICKVAL(Status__c ,'Cancelled'),DateAssignedBusiness__c=null),null,] Try taking that out
    – SeanGorman
    Jan 4, 2019 at 20:43

1 Answer 1


If you did this in workflow with a field update, the formula is unlimited in size. The main drawback to this approach is that the data only updates when the item is updated while formula fields 'update' when they are accessed.

Set the workflow to always fire. let it take all of the data and calculate a response and update a standard field. (resultA)

Then use the formula field to compare that result (resultA) with the items that change as the day changes. (for example: 'days between A and Z < 14' etc)

This way you can have a single call in the formula to a standard field.

  • Thanks for your response, I cannot move this is to Workflow. is there any way to do this only in Fomrula Field ?
    – Learner
    Jan 4, 2019 at 20:36
  • Could you move 'some' of it to the workflow? The issue with the formula field option is the fact that you call the compiled field 4 times so that quads the size of the field. (I think)
    – SeanGorman
    Jan 4, 2019 at 20:38
  • Thanks so much. I will try to move the logic to Workflow and update the formula field.
    – Learner
    Jan 4, 2019 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .