I have a requirement where in need to build a formula for country code and Product code. Formula which i have built has a length of 44000 char and i see the length allowed on formula field are 3900. Can someone suggest if there is any other workaround to get this done.

Thanks!!

  • 1
    You may have to write a trigger to update the field. – Raul Mar 21 '17 at 6:55
  • Thanks for the reply Rahul. Apart from customization can this be achieved through general configuration? – Vipin Mar 21 '17 at 7:00
  • post your formula here and we can try to optimize it – o-lexi Mar 21 '17 at 18:01

You can bypass that limit to have a limit of 5000 (compiled size) chars, by externalizing all long strings to custom labels

Example where you can do that :

Without custom label : CONTAINS('Value1,Value2,...ValueN',valueToCheck)

With custom label : CONTAINS($Label.myCustomLabel,valueToCheck)

If you can't achieve that with a custom label, then you'll need to create a new formula field to split your formula into two (<3900), and have the 5000 compiled limit size

You can achieve the functionality using below approach : -

  1. Create Long Text Area If the output of the formula ix Text based otherwise create field as per your requirement.
  2. Need to incorporate trigger to calculate formula which you are trying in the formula field.

OR

you can write a workflow to update the field providing the same logic in field update. This will work only if your field is not of type Checkbox, Picklist etc.

Yes you can go for workflow, but the character limit is 5000.So based on your requirement you need to select the approach.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.