+ Start a Discussion
Amanda JonesAmanda Jones 

Can't compile formula

I have a formula that I think would work, but I can't get it to compile, it's too large. Is there a way to use the CASE function to make it smaller?

IF(
    NOT(
        OR(ISBLANK(First_Time_STI_Total_Cost__c),ISNULL(First_Time_STI_Total_Cost__c))
    ),
    First_Time_STI_Total_Cost__c-Total_Amount_Received__c,
    IF(
        NOT(
            OR(ISBLANK(Repeat_STI_Total_Cost__c),ISNULL(Repeat_STI_Total_Cost__c))
        ),
        Repeat_STI_Total_Cost__c-Total_Amount_Received__c,
        null
    )
)
Himanshu ParasharHimanshu Parashar
Hi Amanda,

If it is hitting formula limit then there is very less possibility that Case function will fix this reason being you are probably using some other formula fields to do final calculation which is causing this issue. SFDC compile all the formulas and calculate the size.

Recenlty I encountered the same issue and I landed on workflow field update. We have larger limit there.


Thanks,
Himanshu
Amanda JonesAmanda Jones
Thanks Himanshu, I will try a workflow instead.