Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
Help with Prompt
 Login/Join
 
Virtuoso
posted
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
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
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
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Do you have an example of that?

Thanks
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Would this be something you could use?
JavaScript
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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...
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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....
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
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>,
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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....
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Did you try two separate prompts? One for the date and one for the time? Then concatenate them together afterwards.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
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.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
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
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.