+ Start a Discussion

Cascaded character count in custom formula fields

Hi Community,

I'm creating a custom formula field Field1 which refers to 4 other formula fields(FieldA,FieldB,FieldC,FieldD) to populate a value. Now based on the value in Field1, I'm populating another custom formula field Field2 using the formula

CASE (Field1, 'A', Object__r.fld1__c, 'B', Object__r.fld2__c, Object__r.fld3__c)

where Object__r is the reference to another custom object through a lookup and fld1,fld2 and fl3 are custom fields on that object.


Now, the character count when compiling formula field Field1 is around 2000. So, when I use it in the formula for Field2 given above, the compiled count comes to around 4000 and hence I'm not able to include anymore conditions. I need to compare values from 'A' to 'T'.


         I found on the community that using Case function instead of multiple If functions will help reduce the character count. I also found that using workflows is another workaround for reducing the character count. So I have implemented the above two methods in the calculation of Field1 and brought down the character count to a minimum but still I'm not able to get the required functionality because for each set of options I give in Case function, the character count of Field1 is being taken into account. Has anybody come across something like this? Is there a way in which I can compare the value in Field1without it being called multiple times.