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

Comment Text Field 1

Status
Not open for further replies.

Roscoe307

Programmer
Jun 20, 2007
24
US
I need to create a formula that will combine four comment fields into one. I tried to concatenate them like this -

{AWRD_TXT}&{PLAN_TXT}&{REQ_TXT}&{SOL_TXT}

but the formula field shows up blank in the report even though the {PLAN_TXT} field has data. How can I get the formula to display the text in the report even if some of the fields are empty?
 
(
if isnull({AWRD_TXT}) then
"" else
{AWRD_TXT}
) &
(
if isnull({PLAN_TXT}) then
"" else
{PLAN_TXT}
)&
(
if isnull({REQ_TXT}) then
"" else
{REQ_TXT}
)&
(
if isnull({SOL_TXT}) then
"" else
{SQL_TXT}
)

-LB
 
Would it have been possible to select the "Use Default Values for Null" in the formula editor to avoid the If statement coding suggestion?
Not correcting the response because I know that works well but I am curious if what I usually do would cause problems that I am not aware of....

Thanks
 
It should work if you choose that option. I don't ordinarily check that for various reasons, e.g., because I want to set a different default if a date field is null because of how I need a comparison to work.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top