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
Mr SlingMr Sling 

Problems in Sandbox -- formulas incorrectly reporting too large?

Not sure if anyone else is seeing this, but Formula Fields in our Sandbox are compiling to be 2-3 times larger than they should be.


A formula that compiles to 1600 characters in our PROD environment will compile to 5100 characters in our Sandbox (TOO LARGE). 

Formula example that's compiling incorrectly (Text Formula): 


IF(AND(LEN(SLA_Number__c)<>0, SMEC_Date__c - TODAY()>0), "1", IF(AND(LEN(SLA_Number__c)<>0, X90__c - TODAY()>0), "2", IF(AND(LEN(SLA_Number__c)=0, X90__c - TODAY()>0),"2", IF(AND(LEN(SLA_Number__c)=0, HW_Date__c - TODAY()>0), "3", "4"))))

 

Originally, I was using the above formula to return IMAGE (instead of 1/2/3/4), and couldn't get it to shrink small enough.  Using examples on the discussion boards I then split it into 2 separate formulas but it still wouldn't compile small enough.  Eventually, I tried posting my formula in a new PROD field and realized I was reinventing the wheel the last 3 hours for nothing.  Grr!  Filed Case number 03262363 with Salesforce Support.

 

Message Edited by Mr Sling on 01-27-2010 04:46 PM
Mr SlingMr Sling
Hrm.. I have existing formula fields that contain twice as many characters as the above example in our PROD environment that don't report errors.  However, I just tried to create a new formula field in our PROD environment using an example from the SF documentation that also reported an unrealistic character limit (over 6600) and failed.  Is something going on today/this week?
MSO-SF USERMSO-SF USER

I am having similar issues today. Odd things even since there are multiple approaches to what i was trying to accomplish

 

1st it was this:

 

IF( net_secure_Recommendation__c="net secure 5 - 2yr", "150.00", IF( net_secure_Recommendation__c="net secure 5 - 3yr", "120.00", IF( net_secure_Recommendation__c="net secure 20 - 2yr", "160.00", IF( net_secure_Recommendation__c="net secure 20 - 3yr", "190.00", IF( net_secure_Recommendation__c="net secure 50 - 2yr", "200.00", IF( net_secure_Recommendation__c="net secure 50 - 3yr", "240.00", IF( net_secure_Recommendation__c="net secure Unlimited - 2yr", "350.00", IF( net_secure_Recommendation__c="net secure Unlimited - 3yr", "400.00", null ) ) ) ) ) ) ) )

 There was an compiling error.

 

Than there was this

 

CASE( net_secure_Recommendation__c, "net secure 5 - 2yr", 150.00, "net secure 5 - 3yr", 120.00, "net secure 20 - 2yr", 160.00, "net secure 20 - 3yr", 190.00, "net secure 50 - 2yr", 200.00, "net secure 50 - 3yr", 240.00, "net secure Unlimited - 2yr", 350.00, "net secure Unlimited - 3yr", 400.00, null )

 

 Much shorter... same issue

 

Then this one

 

 

IF( AND( Number_of_Computers__c <6, ISPICKVAL(Term__c , "2yr") ), 150, IF( AND( Number_of_Computers__c <6, ISPICKVAL(Term__c , "3yr") ), 120, IF( AND( Number_of_Computers__c >5, Number_of_Computers__c <21, ISPICKVAL(Term__c , "2yr")), 160, IF( AND( Number_of_Computers__c >5, Number_of_Computers__c <21, ISPICKVAL(Term__c , "3yr")), 190, IF( AND( Number_of_Computers__c >20, Number_of_Computers__c <51, ISPICKVAL(Term__c , "2yr")), 200, IF( AND( Number_of_Computers__c >20, Number_of_Computers__c <51, ISPICKVAL(Term__c , "3yr")), 240, IF( AND( Number_of_Computers__c >50, ISPICKVAL(Term__c , "2yr") ), 350, IF( AND( Number_of_Computers__c >50, ISPICKVAL(Term__c , "3yr") ), 400, null ) ) ) ) ) ) ) )

 

 

 

 

 The last one worked. My only guess in this case was because the first 2 were looking at another formula field, where as the last one are from manually entered fields.

 

Very odd.