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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled 2

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I am trying to create a formula to concatenate 5 notes fields and each of these note field can be either NULL, blank or filled. When I try note1 & note2 & note3 & note4 & note 5 I get no results if any of these fields are NULL or blank.

Is there a formula to show a blank space if the field is null or blank but show the field if not for 5 fields in a row ?

Note1 = NULL
Note2 = Hello
Note3 = ""
Note4 = Ladies
Note5 = and gentlemen

Results:
Hello Ladies and gentlemen
 
Have you set the formula Workshop to Default Values for Nulls instead of Exceptions for Nulls. If so, then then there are other work arounds to check for empty (Null) strings.
 
It was not set to Default Values For Nulls but by formula still isn't working
 
Clarification, it is now set the Default values.
 
Write formulas like this (assuming these are actually different fields and not separate instances of the same field):

//{@note1}:
If isnull({table.note1}) or
Trim({table.note1})=“” then
“” else
{table.note}+” “//replace my iPad quotes with your own quotes in all places

Repeat for other fields and then concatenation:

{@note1}+{@note2}+//etc

-LB
 
FYI: I have noticed that some string fields do not get flagged as NULL. Using Ken Hamady's solution. Check for a string length of 0 (i.e., if len({table.note1}) = 0 )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top