Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Sal_Cambareri Trusted Contributor.
Trusted Contributor.
356 views

Best way to replace DtPIcker?

Hello-

I support a payroll application that I need to make AcuToWeb compatible. It mostly is, but it currently uses the ActiveX control DtPicker for date entry. I have looked at the DATE-ENTRY control, and it does not suit our requirements because it will not support blank dates. Blank dates are essential to my application which includes many optional dates for termination date, leave start/leave end dates, deduction cutoff dates, ACH pre-notification dates.etc. We have to allow those dates to be 0 (blank).

Has anyone else faced this problem, and if so how did you address it?

Thanks for any suggestions.

Sal Cambareri

UBCC

Director Software Development

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Re: Best way to replace DtPIcker?

When using AcuToWeb, the Acu Date Entry control can be used and some additional properties can provide the look and feel I believe that you are looking for:

https://www.microfocus.com/documentation/extend-acucobol/1021/extend-Interoperability-Suite/BKINRHINUI0L.html

0 Likes
Highlighted
Sal_Cambareri Trusted Contributor.
Trusted Contributor.

Re: Best way to replace DtPIcker?

Thank you.

I had studied that doc, and what I found were two behaviors that don't work for our applications.

1. Once in the date entry control, regardless of what the operator does, the date remains non-zero usually the system date. We have many dates that can legitimately be zero/blank such as an employee termination date. DATE-ENTRY provides no way to enter a 0 date. I have managed to code a workaround for that: I make the Del key a termination key, and when it is pressed and the control exits, the program sees the termination value and sets the date to 0, destroys the DATE-ENTRY control, and displays an ordinary ENTRY-FIELD with the blank date in it. Yes, it's a major kludge, but it will probably work for us although it requires a lot of source code.

2. When control passes to the DATE-ENTRY field, a zero date is always converted to the system date with no warning. A heads-down operator could easily end up entering non-zero termination dates unless they press the Delete key. I have found no work-around for this. 

Regards,

Sal Cambareri

UBCC

Director Software Development

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Best way to replace DtPIcker?

Good morning.

Can you try the SHOW-NONE style?

03 Screen1-De-1, Date-Entry,
  COL 6.20, LINE 3.90, LINES 2.60 CELLS, SIZE 14.90 CELLS,
  ID IS 1, NOTIFY-CHANGE, SHOW-NONE, VALUE-FORMAT 0,
  VALUE Screen1-De-1-Value,
  EVENT PROCEDURE Screen1-De-1-Event-Proc.

From the Documentation that Stephen was reporting yesterday:

Adds a check box to the date entry control. When the check box is checked, the control contains a valid date and/or time. When the check box is not checked, the control behaves as if it had no value, returning all zeroes instead of a date, or all nines instead of a time.

If you have created a date entry control with the SHOW-NONE style, you can programatically cause the check-box to be unchecked and the value to appear grayed out by setting a date of zero or a time of all nines. Likewise, by setting a valid date or time, you can cause the check-box to appear checked and the value to appear normally.

To create a date entry control that uses the SHOW-NONE style and starts with no date or no time, for example, you could use one of the following statements:

DISPLAY DATE-ENTRY, SHOW-NONE, VALUE ZERO
DISPLAY DATE-ENTRY, SHOW-NONE, VALUE 999999

Note that the 999999 in the second example assumes the default HHMMSS time format.

 

----------------------------
Claudio Contardi
Product Support Engineer, Senior
Micro Focus
0 Likes
Sal_Cambareri Trusted Contributor.
Trusted Contributor.

Re: Best way to replace DtPIcker?

Claudio-

Thank you. It is a good thought, and I had tried SHOW-NONE but decided our customers would find it unacceptable for a variety of reasons:

1. Zero/blank dates are not only valid but meaningful in many locations. I.e. A blank termination date indicates an active employee; non-zero indicates a terminated employee. The DATE-ENTRY always displays the current system date for 0 dates. The operators would have to be trained to know that an unchecked box indicates a zero value. That would be a big change for them.

2. Almost everywhere in our applications the values on the screen reflect the actual data values. If we use SHOW-NONE, the operators would have to be trained that when the box is unchecked, even though the value on the screen is non-zero, the value of the data is zero. I don't think we could ever sell that to them. .

3. Unless there is a trick of which I am unaware, the only way an operator could correct a date to zero would be to uncheck the box with the mouse. Even in GUI mode, we support many keyboard loving operators who eschew the mouse, Requiring them to use it would be a problem for everyone.

4. Worse, when the box is unchecked the displayed date is unchanged  (I understand that it can't be blank but changing to the system date would be preferable to only showing the empty check box.)

Regards,

Sal Cambareri

UBCC

Director Software Development

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.