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!

Selecting False or blank records

Status
Not open for further replies.

LDesmond

Technical User
Feb 4, 2002
6
US
A field in my database can be True, False or blank. I am trying to select the records with the False or blank field. I have tried a formula for Not True, but I only get the False records. Any suggestions?
 
{Fieldname}="false" or
IsNull({Fieldname})

should do the trick Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Thanks for the suggestion. I tried that and I still only get the False records.
 
Well there is a bug in dgillz's formula:

{Fieldname}="false" or IsNull({Fieldname})

the Test for Isnull should always come first. Crystal evaluates left to right so it will choke on the formula when has a null value. If this formula is to work then it would have to be:

(IsNull({Fieldname})or {Fieldname}="false" )

But I am a bit confused...is this a boolean field or are the values in the field string values "True", "False"

And are the other values Null or a Blank string of some number of spaces.

IF the answer is Boolean and null then the formula should be:

(IsNull({Fieldname}) or {Fieldname}= False)

If the answer is string and Blank spaces then the formula should be:

(length(trim({Fieldname})) = 0 or
uppercase({Fieldname}) = "FALSE")


If the answer is string or Blank spaces or Null then the formula should be:

(IsNull({Fieldname}) or length(trim({Fieldname})) = 0 or
uppercase({Fieldname}) = "FALSE")


take your pick....hope this helps....Jim
 
Thanks Jim.

It is a boolean field and I had taken the " " out around False. I will give this a shot on Monday.

Thanks again for the help dgillz and Jim.

Linda
 
I can't thank you enough Jim. Putting the isnull first solved my problem.

What a great site this is!!!!!

Linda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top