• bhorakiforce
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Formula in Java Script ---------------------- pmt = ( ((ir/100)/12)* ( pv * Math.pow ( (((ir/100)/12)+1), (np*12)) + fv ) ) / ( ( ((ir/100)/12)+ 1 ) * ( Math.pow ( (((ir/100)/12)+1), (np*12)) -1 ) );

I'm having trouble with the compiled size of a formula. I don't understand why this is compiling into so many characters. The formula simply adds 14 fields together, all of which are numbers. The custom number fields all have 18 digits, which I tried decreasing to 17 but it did not change the compile size. I've also tried changing the field label and field name of each of these 14 fields. I currently have it so it only adds up 13 of the 14 fields (which needs to change) because it can save that way.

 

Also, strangely enough, when I click "Check Syntax" it gives a compiled size of 529 characters.

 

Here is the full error when I try to save the formula:

Error: Invalid Data.
Review all error messages below to correct your data.
Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,011 characters). Maximum size is 5,000 characters

 

Here is my formula:

Added_Value_Interactive_InStream_Video__c
+ Added_Value_App_Banner__c
+ Added_Value_FPA__c
+ Added_Value_In_Banner_Video__c
+ Added_Value_In_Stream_Video__c
+ Added_Value_Interactive_Pre_roll_SC__c
+ Added_Value_Mobile_Web_Banner__c
+ Added_Value_Tablet_Full_Page__c  
+ Added_Value_Tablet_Leaderboard__c  
+ Added_Value_Tablet_Medium_Rectangle__c  
+ Added_Value_Tablet_Square__c
+ Added_Value_Tablet_Wide_Skyscraper__c
+ Added_Value_In_Stream_Video_Blend__c
+ Added_Value_Video_Blend__c
+ Added_Value_Display_Blend__c

 

Hopefully someone has an idea of how to decrease the compile size by 11 characters...

 

UPDATE: I just tried copying and pasting this formula into a new field and it compiled and saved... I gave it the same characteristics as the previous formula (return type of number, 0 decimal places, 18 characters). Is it possible I can't save this custom field because it is being used by another custom field? If so, how will I know what other field is getting too big?