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
Marcio Zima.ax1538Marcio Zima.ax1538 

Checkbox - "Compiled formula is too big to execute"

I'm using many formulas like that:

 

IF(Payment_01__c = TRUE, 1, 0)
+ IF(Payment_02__c = TRUE, 4, 0)
+ IF(Payment_03__c = TRUE, 16, 0)

 

Payment is a checkbox. There are many other checkbox in the object with the same formula. And there is a Total that is the final sum of all thing. But I'm receiving this message:

Error: Compiled formula is too big to execute (5,371 characters). Maximum size is 5,000 characters

 

How can I solve it?

Madhan Raja MMadhan Raja M
sourav046sourav046
I see it weird ! You wrote IF(Payment_01__c = TRUE, 1, 0) .what does it mean ? Does it mean if Payment_01__c is TRUE ,then certain field should be updated by 1 else 0 ? Why the ' + ' sign ? Let us know what you exactly want ? A formula can be used for a particular field only .If you want to update all fields(though similar functionality) using one formula thats not possible .
Marcio Zima.ax1538Marcio Zima.ax1538

It have a value to each checkbox. If the person check the "Payment_01__c", the value "1" will be showed on the visualforce page. If the person check the "Payment_02__c", the value "4" will be showed instead.

And there is a final result that is a sum of all checked values. There are many checkboxes in the object.