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
Michael Scott 73Michael Scott 73 

Need a formula field

if field 1 is populated, use field 1
If Field 1 is blank, use field 2
if field 1 and field 2 is blank use field 3
if field 1, field 2, field 3 are all blank use blank value

**Description; assigning a person to a managers role (these are all text fields)
1. if field 1 is not blank, use field 1
2. if field 1 is blank, use name on field 2
3. if field 1 and field 2 are blank, use name on field 3
4. if field 1, field 2, field 3 are all blank, leave manager's role field blank
 
Best Answer chosen by Michael Scott 73
Andrew GAndrew G
basically, run through the fields in order and use the value from the first non-blank field?
try:
IF( 
  !ISBLANK( Field_One__c  ), Field_One__c  ,
  IF( 
    !ISBLANK(Field_Two__c), Field_Two__c,
    IF( 
      !ISBLANK( Field_Three__c), Field_Three__c,
      NULL
	)
  )
)