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!

IF Formula Help needed - NULLs? 1

Status
Not open for further replies.

Jeffs23

Programmer
May 20, 2013
8
US
My current formula:

IF {aaUDS7;1.PrenatalPatient} = 1 AND {aaUDS7;1.Age} < 15 then 1 else 0

In my dataset, PrenatalPatient is NULL on all my patients. In my report, I am expecting to see a 0; however I am not getting any value. Should I be evaluating for my NULLs somehow?
 

Try testing for null values first:

if isnull({aaUDS7;1.PrenatalPatient}) then 0
else
IF {aaUDS7;1.PrenatalPatient} = 1 AND {aaUDS7;1.Age} < 15 then 1
else 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top