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
SL TanSL Tan 

Compile limit problem

Hi
I have a Custom Object in which I have 14 Formula Fields (Currency) for Sub-Amounts. I need to add up all these Sub-Amount Fields to arrive at a Total Amount for this Custom Object. I tried to use the Formula option but it returns with a compile limit as only 5,000 is allowed but my calculation goes beyond 8,000. I tried to solve this by using 2 Formula Fields each adding up 7 Sub-Amounts and then create another Formula Field to add these 2 totals but it still has the same compile problem message.
I tried but cannot use the Workflow Action option as we cannot do fieldupdate calculation based on Formula fields unfortunately.
Thus I think I have to use a S-control to resolve this. Can anyone please kindly advise me how should my coding be like after Select From statement in order to let the S-Control tabulate the Sub-Amounts to arrive at the Total Amount?
I am sorry if this sounds a primitive question but as I am not familiar with coding, I hope someone can point this out and assist me
Many thanks in advance
SL