Focal Point
Help with Prompt

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1381068331

June 10, 2005, 02:37 PM
Prarie
Help with Prompt
I have a front-end in MRE calling a Focexec in Self-Service that Prompts for a Date-Time Stamp that is passed to the Report for Screening.
The users want to be able to change the date and time if needed...so I had a hard coded Default Date set up.
-DEFAULT &EVENT_TIME= '2005/05/15 13:53:13'

-PROMPT &EVENT_TIME.Enter Date and Time.

-mrnoedit BEGIN
-INCLUDE mustloc-1
-mrnoedit END

-RUN

That was fine.

Now the user would like it to Default to Current Date and time...with still the ability to change.

Now I have this...and every combination of -Set and -Default I can think of and it will only pass
The &DATYYMD...And not the date values? Any thoughts.

-SET &TOD1=EDIT(&TOD,'99$99$99');
-SET &TIMEX=EDIT(&TOD1,'99:99:99');
-DEFAULT &EVENT_TIME = &DATEYYMD | ' ' |&TIMEX;
-PROMPT &EVENT_TIME.Enter Date and Time.
-RUN
-mrnoedit BEGIN
-INCLUDE mustloc-1
-mrnoedit END
June 10, 2005, 03:51 PM
susannah
to my knowledge you can't default and then prompt for anything other than a constant.
wierd. but i've tripped over this same thing before. so my launch pages avoid prompts altogether, and use javascript to initialize dates. I just tried your code and got the dreaded red screen of death
June 10, 2005, 03:53 PM
Prarie
Do you have an example of that?

Thanks
June 10, 2005, 07:30 PM
reFOCUSing
Would this be something you could use?
JavaScript
June 10, 2005, 07:32 PM
Prarie
Thanks...I took a look...and I'm just getting to go on vacation for a week...guess that's what I get to work on when I get back...
June 24, 2005, 03:12 PM
Prarie
I'm...Back.
I looked at the Javascript you provided...and that's a bit over my Javahead....I'm taking a class sometime this year...anyway...anyone know of something a little less complicated to get a TODAY date-time stamp to appear like
2005/05/15 13:53:13...with the ability to edit it if they want to go back in time.

Thanks....
June 24, 2005, 04:04 PM
Francis Mariani
I just spent half an hour on this
and I don't you can do anything about it
Normally, if you want to -DEFAULT
an amper to another amper, you would do
DEFAULT &ER1 = &ER2.EVAL;
But this does not work with a
PROMPT for some
weird reason. So, my simplest
suggestion
would be to do this, and educate the user
that today means today's date
and the time right now:
-DEFAULT &EVENT_TIME = 'Today';
-PROMPT &EVENT_TIME.Enter Date and 
Time (Format YYYY/MM/DD 99:99:99).
-mrnoedit BEGIN
INCLUDE mustloc-1
-mrnoedit END
The next s
uggestion
would be to create an HTML page to launch the program.

This message has been edited. Last edited by: <Mabel>,
June 24, 2005, 04:14 PM
Prarie
The front end is in MRE...and that is the way it has to be. They have to be able to go back for 24 hours. This is a safety thing...and they have to know where everyone in a Plant has scanned there security badge.
Thanks for taking the time...yes it is frustrating. May have to take that first suggestion. Thing about this is...it was in Impromtu...and I'm converting...this is supposed to duplicate what they had....
June 26, 2005, 11:53 PM
Piipster
Did you try two separate prompts? One for the date and one for the time? Then concatenate them together afterwards.
June 27, 2005, 03:16 AM
Francis Mariani
The problem is that you cannot DEFAULT a DM variable to the value of another DM variable before the PROMPT kicks in. One or two prompts will not make a difference.
July 01, 2005, 02:48 PM
Kerry
Hi Prarie,

Check and see if the following document is what you are looking for.

How to default today's date with auto prompt in MR? http://techsupport.informationbuilders.com/sps/83101125.html

-DEFAULT in report still prompts user for value http://techsupport.informationbuilders.com/sps/63111029.html

You will need to login with tech support UserID and password. Please let us know if this helps you.

Cheers,

Kerry