0

I'm trying to build a formula field that will return text. I was wondering if any of you guys have suggestions for slimming down the following formula, or perhaps a workaround. When it compiles I am over the 5K limit by 228 characters! Any help would be greatly appreciated!

Formula in question:

enter image description here I believe the culprit is 'Use_Case_Stamp___c), which returns a date of 'Today()' when 2 out of the 11 possible 'Use Case Checkboxes' are checked.

The formula for 'Use_Case_Stamp__c' is:

enter image description here

The formula for 'Use_Case_Total__c' (pictured above) is: enter image description here

I'm hoping I can fit this into one formula field as opposed to incorporating additional WFR's. Thank you all in advance.

-M

Nivi
  • 89
  • 1
  • 9

1 Answers1

1

Why not optimize the formula so that you don't have the expensive Use_Case_Stamp___c field occur so many times

IF( ISBLANK(Use_Case_Stamp___c),
       //Covers your is blank use case
       IF( Days_As_Customer__c > 120, "Not Met", "In Progress"),
       //Is not Blank Use case 
       IF(Days_As_Customer__c > 120,
          IF(Use_Case_Stamp___c > Contract_Start_Date__c + 120, "Metric Met (Late)", NULL),
          // days <= 120
          IF(Use_Case_Stamp___c <= Contract_Start_Date__c + 120, "Metric Met (On Time)", NULL)
       )
  )

That should get you below, if not you may need to use wf to set the sum of those checkboxes to a single field as opposed to a formula which is what I think you are trying to avoid

Gareth Jordan
  • 968
  • 1
  • 6
  • 10
  • Thanks for this! I actually found a workaround where I made a 'Copy' 'Total Use Case' (which is the reason 'Use Case Stamp' uses so many characters. I just had the output of 'Total Use Case' copy over to 'Copy Total Use Case' as a WFR. That being said, I will also try this out of curiosity. Thanks so much for the response - really helpful! – Nivi May 02 '18 at 15:36