Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to condition a concatenated formula when a field is null

Status
Not open for further replies.

tcbc

Technical User
Feb 7, 2009
33
US
If the middle initial is null the formula brings back empty field. How do I condition formula below to pull even if Middle initial is blank

formula ={master_cred.first_name} +" "+{master_cred.middle_name}+ " "+ {master_cred.last_name}+","+ " "+{master_cred.degree_type}
 
Hi,
Test for the NULL (and/or blanks)first then build the concatenated string:
Code:
(If IsNull({master_cred.middle_name}) 
or 
Trim({master_cred.middle_name}) = "" )[COLOR=green]//optional test for blanks instead of true NULLs[/color]
Then
formula ={master_cred.first_name} +" "+{master_cred.last_name}+","+ " "+{master_cred.degree_type}
Else
formula ={master_cred.first_name} +" "+{master_cred.middle_name}+ " "+ {master_cred.last_name}+","+ " "+{master_cred.degree_type}


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top