Jul 21, 2010 #1 ABetha Programmer Jul 14, 2010 35 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}
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}
Jul 21, 2010 1 #2 fisheromacse IS-IT--Management May 4, 2009 910 US 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} Upvote 0 Downvote
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}
Jul 21, 2010 Thread starter #3 ABetha Programmer Jul 14, 2010 35 US 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 Upvote 0 Downvote
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
Jul 21, 2010 #4 fisheromacse IS-IT--Management May 4, 2009 910 US you need to always check for nulls first. otherwise, once a null is encountered the processing effectively stops. Upvote 0 Downvote
you need to always check for nulls first. otherwise, once a null is encountered the processing effectively stops.
Jul 21, 2010 Thread starter #5 ABetha Programmer Jul 14, 2010 35 US Thank You fisheromacse checking the isnull worked perfectly Upvote 0 Downvote