1

I have created formula field on Lead named CountryScore. But on saving the formula it is giving error 'Compiled formula is too big to execute (15,366 characters). Maximum size is 15,000 characters (Related field: Formula)'

PFB the formula :

IF (ISBLANK(Country),0,
IF(CONTAINS(UPPER(Country), "ENGLAND"),6,
IF(CONTAINS(UPPER(Country), "SCOTLAND"),6,
IF(CONTAINS(UPPER(Country), "SOUTHERN"),6,
IF(CONTAINS(UPPER(Country), "IRELAND"),6,
IF(CONTAINS(UPPER(Country), "AUSTRALIA"),6,
IF(CONTAINS(UPPER(Country), "GERMANY"),6,
IF(CONTAINS(UPPER(Country), "SAUDI ARABIA"),6,
IF(CONTAINS(UPPER(Country), "JAPAN"),6,
IF(CONTAINS(UPPER(Country), "INDIA"),6,
IF(CONTAINS(UPPER(Country), "TURKEY"),6,
IF(CONTAINS(UPPER(Country), "USA"),6,
IF(CONTAINS(UPPER(Country), "UNITED STATES"),6,
IF(CONTAINS(UPPER(Country), "UNITED STATES OF AMERICA"),6,
IF(CONTAINS(UPPER(Country), "CANADA"),6,
1)))))))))))))))

Can someone help me on how to reduce the compile size of this formula.

Thanks

1 Answer 1

2

What are the compiled costs of each formula function should provide some good insight.

As for a specific recommendation, look at using CASE() instead of that mess of nested IF().

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .