1

I have 3 text formula fields: Field 1, Field 2 and Field 3. I want to create Field 4 formula field that checks if there is value in any of those 3 fields and give the value to Field 4.

I have tried:

IF ( NOT(ISBLANK (Field_1__c)), Field_1__c, NULL) - but the formula is too big to execute.

BLANKVALUE (Field_1__c, NULL) - but I want to be able to check all 3 and the populate Field 4 with the value

Thanks a lot.

  • This formula is very short. If it fails because it's too big to execute than that means that the formula in Field_1__c is at the limit of what it can contain. If you edit your question and add that formula, then someone may be able to help you improve its efficiency. – Kasper Oct 22 '19 at 13:09
  • @Kasper - I was just replying below. I had to create 3 formula fields, as I had 11000+ characters formula, so they had to be split into 3. The formula fields are to generate different codes, depending on the Billing Country selected and Billing States. – SSimion Oct 22 '19 at 13:14
  • Unfortunately, when you include a formula in another formula the compiled size is always at least the size of the formula you include. With formula's that big you might want to look into programming solutions (triggers) or perhaps you can do something with a process builder. – Kasper Oct 22 '19 at 13:17
0

Please check the formula above:

IF(
NOT(
ISBLANK(Field1__c)
), 
Field1__c, 
IF(
NOT(
ISBLANK(Field2__c)
), 
Field2__c, 
IF(
NOT(
ISBLANK(Field3__c)
), 
Field3__c, 
null
) 
) 
)
| improve this answer | |
  • Thanks a lot. I have just tried it, but it's too big to execute, unfortunately. I should specify the field 1,2,3 formula fields have 3000+characters.... – SSimion Oct 22 '19 at 13:09
  • Can you detail which is the field type for those three fieds? Are they Text Area (Long)? If the formula field won't work for you this concatenation can be performed via Process Builder as well, which can be ran every time the record is updated. – user1067017 Oct 22 '19 at 13:14
  • They are Formula fields – SSimion Oct 22 '19 at 13:16
  • I would suggest you use Workflows in order to achieve what you want. I tested it and it seems to be working: Create a Workflow Rule on the object you want to have that field populated with the "Evaluate the rule when a record is created, and every time it's edited". On the Rule Criteria you can either choose something like "1<>2" (for it to always run) or add your own criteria. Then create a Text Area (Long) field in order to retain this value and on the Worfklow Field update paste the formula I answered you with in the first place. – user1067017 Oct 22 '19 at 13:32
  • Just tried it, but it doesn't update the field. – SSimion Oct 22 '19 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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