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
Dan RamirezDan Ramirez 

Formula field character limit workaround

Hi! We currently use a formula field on the case object to assign numerical priority values to cases based on a multitude of variables, some of which are based on the user viewing the case. To put it simply, users view a list view sorted by the priority number and work from the top down so they are always working on the most pressing case; the priority value is different based on the person viewing the list and their skills, which is why we use a formula field instead of a workflow, PB, or Apex to set those values. However, we've found that we're now maxed out on formula field character limits and need to find a way to get around this since the prioritization formula needs to be more complex. Can we use any other sort of "automation" to set the value of a field dynamically based on case and user fields? Or can you recommend a way to get around the formula limits? I've posted our current formula to give you a better idea of what we're using it for. Thanks!
if( On_Hold_Future_Followup_Date__c = TRUE , 10, 

/***** Garbage Duty ******/ 
if( Case_To_Clean__c = TRUE, 
if( $User.Garbage_Duty__c = TRUE, 2.5, 
if( and( text( Priority) = "Immediate", Owned__c = FALSE), 1, 8)), 

/***** Unowned Cases ******/ 
if( OR( Owner:Queue.QueueName = "General Sales", Owner:Queue.QueueName = "Key Accounts"), 
if( text( Status ) = "New", 
if( Account.RecordType.DeveloperName = "Vendor_Account", 2, 
Case( text( Priority), 
"Low" ,7, 
"Medium", 5, 
"High", 3, 
1)),1), 

/***** Owned By Me ******/ 
if( Owner:User.Id = $User.Id , 
if( OR( text( Status ) = "New", contains( text( Status ), "Hold")) , 
Case ( text ( Priority ), 
"Low", 6, 
"Medium", 4, 
"High", 2, 
1), 
if( text( Status ) = "InProgress", 1, 
if( OR( text( Priority ) = "Low", text( Priority ) = "Medium"),2,1))), 

/***** Owned By Someone In the Office ******/ 
if( OR( Owner:User.Out_of_Office_Until__c <= today() , isblank( Owner:User.Out_of_Office_Until__c ) ), 
if( text( Status ) = "InProgress", 10, 
if( text( Status ) = "NewCustomerResponse", 8, 
if( contains( text( Status ) , "Hold"), 9, 
if( text( Priority ) = "Immediate", 6, /* need to bump this up after 2 hours OR at 4PM, whichever comes first */ 
7)))), 

/***** Owned By Someone Out Of Office ******/ 
if( OR( text( Status ) = "New" , text( Status ) = "InProgress"), 
Case( text( Priority), 
"Low" ,7, 
"Medium", 5, 
"High", 3, 
1), 
if( OR( text( Priority ) = "Low" , text( Priority ) = "Medium"), 1,0) + 
if( text( Status ) = "NewCustomerResponse", 1, 6)) 

)))))
RD@SFRD@SF
Hi Dan,

Try creating multiple formulas by splitting the above formula and let the list view criteria do the if else condition check.

Hope it helps
RD