function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jasmine Cam 25Jasmine Cam 25 

IF formula for a field if it is populated or not

Hi,
I would like to create a formula text field (X) that is populated with 'TRUE' if another field (Y) is populated. If field Y is not populated, then i want field X to say TRUE.

Does anyone know of a formula please?

Thanks!
Best Answer chosen by Jasmine Cam 25
Keval PadiaKeval Padia
Hey Jasmine, 

Below mentioned formula will be an optimum solution to your requirement. Do try it.

IF(ISBLANK( Multi_Select_Picklist_Field__c ), "None", "TRUE")

Hope this answer helps you. Also, if you need any other assistance related to SFDC customization and development, do let me know. For more reference, do visit our website and profile given below in the signature.

Regards,
Keval Padia,
www.nimblechapps.com
https://sforce.co/2SFCx85

All Answers

Keval PadiaKeval Padia
Hey Jasmine, You can try below mentioned formula

IF(ISBLANK( Text_Field__c ), "None", 
IF(CONTAINS("DEMO", Text_Field__c ), "TRUE", "FALSE"))

In this example, I have taken a Text Field of a custom object as a decision making field. So, in this example,
  • if the Text Field is empty, formula text field (Demo Formula Field1) will display "None" as the field value. User-added image
  • if the Text Field is entered with value "DEMO", formula text field (Demo Formula Field1) will display "TRUE" as the field value.User-added image
  • if the Text Field is entered with value other than "DEMO", formula text field (Demo Formula Field1) will display "FALSE" as the field value.User-added image
Hope this answer helps you.

Regards,
Keval Padia,
www.nimblechapps.com
https://sforce.co/2SFCx85
Jasmine Cam 25Jasmine Cam 25
Hi Keval, the field i want to reference is a multi-picklist field. Do you know a formula which supports this? I just need it to say TRUE if it contains any value, no particular value. 
Keval PadiaKeval Padia
Hey Jasmine, try the below mentioned formula and let me know if it works in your situation.

IF(ISBLANK( Multi_Select_Picklist_Field__c ), "None", 
IF(INCLUDES(Multi_Select_Picklist_Field__c, "DEMO1"), "TRUE", 
IF(INCLUDES(Multi_Select_Picklist_Field__c, "DEMO1"), "TRUE", 
IF(INCLUDES(Multi_Select_Picklist_Field__c, "DEMO1"), "TRUE", 
IF(INCLUDES(Multi_Select_Picklist_Field__c, "DEMO1"), "TRUE", "TRUE")))))

The scenario that I picked:

'Multi Select Picklist field' has value: DEMO1, DEMO2, DEMO3, DEMO4
So, if I select any of these values or all of them, Demo Formula Field2 (Text) = TRUE.
User-added image
and, If I don't select any of these values, then Demo Formula Field2 (Text)= None.
User-added image

Regards,
Keval Padia,
www.nimblechapps.com
https://sforce.co/2SFCx85
Jasmine Cam 25Jasmine Cam 25
Hi Keval,

The issue that we have is that the field has around 50 values. Is there a Is Not Blank formula?
Keval PadiaKeval Padia
Hey Jasmine, 

Below mentioned formula will be an optimum solution to your requirement. Do try it.

IF(ISBLANK( Multi_Select_Picklist_Field__c ), "None", "TRUE")

Hope this answer helps you. Also, if you need any other assistance related to SFDC customization and development, do let me know. For more reference, do visit our website and profile given below in the signature.

Regards,
Keval Padia,
www.nimblechapps.com
https://sforce.co/2SFCx85
This was selected as the best answer
Jasmine Cam 25Jasmine Cam 25
Thanks Keval, this is exactly what i needed!
Keval PadiaKeval Padia
You are welcome Jasmine. Do let me know if any further assistance is needed. Will be happy to help.

Regards,
Keval Padia,
www.nimblechapps.com
https://sforce.co/2SFCx85