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

If IsNull Always Returns Alternate Text 1

Status
Not open for further replies.

mabis

Technical User
Jul 22, 2006
25
US
CRM program running on SQL2000. Attempting to evaluate contact titles that are null. In SQL title field is datatype=picklist, size 64, nulls allowed.

In all cases my formula returns "No Title" when sql query verifies some title fields are populated.

if isnull({CONTACT.TITLE}) or InStr({CONTACT.TITLE}, " ") = 0 then "No Title" else ({CONTACT.TITLE})

Any help is appreciated. My google efforts dont go further than the formula above.

 
Try:

if isnull({CONTACT.TITLE})
or
trim({CONTACT.TITLE}) = "" then
"No Title"
else
{CONTACT.TITLE}

-k
 
Thank you for your quick and accurate reply. This works as I hoped and intended.

Mabis
 
Hi,
I have similar problem when using IsNull in Crystal

If IsNull(Count({tmpChild.FFCHILD})) OR Count({tmpChild.FFCHILD}) = 0 then
SuppressChild:= TRUE
Else
SuppressChild:= FALSE;

The value in tmpchild.FFChild is 20.00. However, IsNull(Count({tmpChild.FFCHILD})) returns True as does IsNull({tmpChild.FFCHILD}).

Any ideas as to how to make this work correctly would be much apprecited.

Many thanks
Nathan Davies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top