I have a window that allows the user to schedule an event for a given time.
However, at the moment the time is chosen by entering the INT equivalent (i.e. seconds past midnight).
Now, I don't know many people who tell the time using seconds past midnight Is there a more sensible way of presenting the user with a way to select a time (not a datetime) without haveing to splice together buttons, combo boxes and fill-ins?
If there is please could you point me in the right direction.
Oh, using Progress 10.2B (or something) and AppBuilder.
Thanks
Oliver
In the ADM2 I'd put together a SmartDataField, in GUI for .NET a UserControl and expose the Value.
But I'm pretty sure, there is no out of the box ABL component for that.
Thanks for the reply.
I thought you might say that.
I've put together a fill-in with a 99:99 format and the following leave trigger...
IF SELF:SCREEN-VALUE = " : " THEN
SELF:SCREEN-VALUE = "00:00".
DEF VAR li-hour AS INT NO-UNDO.
DEF VAR li-minute AS INT NO-UNDO.
li-hour = INT(ENTRY(1, SELF:SCREEN-VALUE, ":")).
li-minute = INT(ENTRY(2, SELF:SCREEN-VALUE, ":")).
IF li-minute > 59
OR li-hour > 23 THEN
DO:
MESSAGE "Time not valid" SKIP "Please enter a valid time"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
APPLY "ENTRY" TO SELF.
RETURN NO-APPLY.
END.
li-time = li-hour * 3600 + li-minute * 60.
It does the trick for now and lets the user enter a time using the keyboard.
That should be fine for now.
Thanks
Oliver
In Outlook this is solved by providing the user with an editable combo-box that contains all half-hours times of a day (48 items I guess).
The user can select these and edit if necessary.
Note that the user can enter *any* value, if not valid it is simply cleared on leave.
I guess if that works for Outlook, it can work for your app.
-peter
mikefe wrote:
In the ADM2 I'd put together a SmartDataField, in GUI for .NET a UserControl and expose the Value.
But I'm pretty sure, there is no out of the box ABL component for that.
There is the ADM2 Time SmartDataField (adm2/timesdfv.w), which has been around for some time.
-- peter
There is the ADM2 Time SmartDataField (adm2/timesdfv.w), which has been around for some time.
True - now that you are reminding me. All those 10.1x ADM2 enhancements were the best kept secret for a long. Like the DataView.