Check if date field is blank

I contacted Epicor Support and asked them how they would do it. They got back to me and suggested this, it works.

If Integer(JobHead.TravelerLastPrinted) > 0 Then 1 Else 0



________________________________
From: jckinneman <jckinneman@...>
To: vantage@yahoogroups.com
Sent: Sunday, May 20, 2012 10:16 AM
Subject: [Vantage] Re: Check if date field is blank

The field might be "blank" or the earliest date the system/database normally handles, but not null. You might compare it to what is the "epoch" on your system or a date that will never exist in your database. For example the epoch on Unix is Jan 1, 1970. Or if all dates entered in your system are after Jan 1, 1995 you can use a date before that date. Off the top of my head I forget if OpenEdge has its own date it considers the epoch.

JobHead.TravelerLastPrinted > somedate then "printed" else "not Printed"

Jim Kinneman
Encompass Solutions, Inc

--- In vantage@yahoogroups.com, "b_ordway" <cooner_55421@...> wrote:
>
> I'm not sure the ? applies to date fields.
> One trick I've used before is to compare with an unused UD data field.
> So this might work:
> If JobHead.TravelerLastPrinted NE Date01 Then true Else false
>
> Assuming you haven't been populating Date01
>
> --- In vantage@yahoogroups.com, "tkoch77" <tkoch77@> wrote:
> >
> > I am trying to check if a date field is blank using a calculated field. The calculated field is logical. So if the date field is not empty I want the checkbox = true and if there is no date in the field uncheck the checkbox. Here is what I have tried using the OpenEdge Development Handbook from page 2-17 but it isn't doing anything filtering based on the IF statement. Any ideas?
> >
> > If JobHead.TravelerLastPrinted NE ? Then true Else false
> >
> > Thanks,
> >
> > Ted
> >
>




------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
I am trying to check if a date field is blank using a calculated field. The calculated field is logical. So if the date field is not empty I want the checkbox = true and if there is no date in the field uncheck the checkbox. Here is what I have tried using the OpenEdge Development Handbook from page 2-17 but it isn't doing anything filtering based on the IF statement. Any ideas?

If JobHead.TravelerLastPrinted NE ? Then true Else false

Thanks,

Ted
Sorry, should have mentioned I am trying this in a BAQ.



________________________________
From: tkoch77 <tkoch77@...>
To: vantage@yahoogroups.com
Sent: Friday, May 18, 2012 11:28 AM
Subject: [Vantage] Check if date field is blank

I am trying to check if a date field is blank using a calculated field. The calculated field is logical. So if the date field is not empty I want the checkbox = true and if there is no date in the field uncheck the checkbox. Here is what I have tried using the OpenEdge Development Handbook from page 2-17 but it isn't doing anything filtering based on the IF statement. Any ideas?

If JobHead.TravelerLastPrinted NE ? Then true Else false

Thanks,

Ted





------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
I'm not sure the ? applies to date fields.
One trick I've used before is to compare with an unused UD data field.
So this might work:
If JobHead.TravelerLastPrinted NE Date01 Then true Else false

Assuming you haven't been populating Date01

--- In vantage@yahoogroups.com, "tkoch77" <tkoch77@...> wrote:
>
> I am trying to check if a date field is blank using a calculated field. The calculated field is logical. So if the date field is not empty I want the checkbox = true and if there is no date in the field uncheck the checkbox. Here is what I have tried using the OpenEdge Development Handbook from page 2-17 but it isn't doing anything filtering based on the IF statement. Any ideas?
>
> If JobHead.TravelerLastPrinted NE ? Then true Else false
>
> Thanks,
>
> Ted
>
The field might be "blank" or the earliest date the system/database normally handles, but not null. You might compare it to what is the "epoch" on your system or a date that will never exist in your database. For example the epoch on Unix is Jan 1, 1970. Or if all dates entered in your system are after Jan 1, 1995 you can use a date before that date. Off the top of my head I forget if OpenEdge has its own date it considers the epoch.

JobHead.TravelerLastPrinted > somedate then "printed" else "not Printed"

Jim Kinneman
Encompass Solutions, Inc

--- In vantage@yahoogroups.com, "b_ordway" <cooner_55421@...> wrote:
>
> I'm not sure the ? applies to date fields.
> One trick I've used before is to compare with an unused UD data field.
> So this might work:
> If JobHead.TravelerLastPrinted NE Date01 Then true Else false
>
> Assuming you haven't been populating Date01
>
> --- In vantage@yahoogroups.com, "tkoch77" <tkoch77@> wrote:
> >
> > I am trying to check if a date field is blank using a calculated field. The calculated field is logical. So if the date field is not empty I want the checkbox = true and if there is no date in the field uncheck the checkbox. Here is what I have tried using the OpenEdge Development Handbook from page 2-17 but it isn't doing anything filtering based on the IF statement. Any ideas?
> >
> > If JobHead.TravelerLastPrinted NE ? Then true Else false
> >
> > Thanks,
> >
> > Ted
> >
>