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

flagging empty date fields 1

Status
Not open for further replies.

ABetha

Programmer
Jul 14, 2010
35
0
0
US
I am trying to flag an empty date field and change the value to a default value this does not work

if isnull({vserialNo.WarrEnd}) then
datetimevalue("12/12/1999")
else
{vSerialNo.WarrEnd}
 
You don't say how it doesn't work?

If i have to hazard a guess, the values may not be null but blank instead.
Try:

if isnull({vserialNo.WarrEnd}) OR TRIM(totext({vserialNo.WarrEnd}))="" then
datetimevalue("12/12/1999")
else
{vSerialNo.WarrEnd}
 
I tried that it worked. Thank you. I tried the same thing with another blank field that I am not getting an data in this field


if {UserView.rptid} ={vSerialNo.ReportId} then
0
else if isnull({UserView.rptid}) or trim(totext({UserView.rptid}))= "" then
1
else
1
 
you need to always check for nulls first.
otherwise, once a null is encountered the processing effectively stops.
 
Thank You fisheromacse checking the isnull worked perfectly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top