Hot Topic (More than 10 Replies) User Input Question (Read 2862 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
User Input Question
Mar 6th, 2008 at 3:06pm
Print Post Print Post  
What is the difference between @PromptforUserInput() and @QuestionUser()?
Why select 1 over the other?

I am trying to use one of the above to get a specific date the user wants to run a mass update on. How do I get the  @PromptforUserInput() or @QuestionUser() to run once instead of on each record.

I have tried lots of methods and have not been successful.

This is what I am doing


Ask user for input
Vrundate = @PromptForUserInput("Please enter ship date to process:", "")

See if  shipdate matches Vrundate
If shipdate = Vrundate

Then
{            
Do Stuff
}

Thoughts and suggestions greatly appreciated.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: User Input Question
Reply #1 - Mar 6th, 2008 at 3:48pm
Print Post Print Post  
I think that they are actually the same function with two names.

You can put the @PromptForUserInput() in the Global Code of the mass update. That will make it ask just once.

Make vRunDate a static variable in Global Code. Then, you can use it in the regular mass update code to do your date comparison.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: User Input Question
Reply #2 - Mar 6th, 2008 at 3:50pm
Print Post Print Post  
Quote:
What is the difference between @PromptforUserInput() and @QuestionUser()?


There isn't one. They are the same thing just with two names.

Quote:
I am trying to use one of the above to get a specific date the user wants to run a mass update on. How do I get the  @PromptforUserInput() or @QuestionUser() to run once instead of on each record. 


Use Global Code and make Vrundate a Stat. So global code will have

Code
Select All
Stat Vrundate as Date

Vrundate = @PromptForUserInput("Please enter ship date to process:", "")  



Then another event will have

Code
Select All
If shipdate = Vrundate Then
{
     Do Stuff
} 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: User Input Question
Reply #3 - Mar 6th, 2008 at 3:53pm
Print Post Print Post  
Robert,

BTW, don't forget that you could also use @Calendar() instead of @PromptForUserInput().
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: User Input Question
Reply #4 - Mar 6th, 2008 at 4:11pm
Print Post Print Post  
Carl, Ray,

Excellent information and ideas, Thanks for the help  Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: User Input Question
Reply #5 - Apr 14th, 2009 at 12:05pm
Print Post Print Post  
Hello!

I am trying to use on a command Button to start with a  @PromptforUserInput() or @QuestionUser() but  I have tried lots and have not been successful:
the @PromptforUserInput() or @QuestionUser()  does not start at all!

What i am doing wrong?  

hier is my Code:

var vRS as Int
var vLabNr as String

     vLabNr = @PromptforUserInput("Geben Sie ddas LabNr des Patienten ein.", "")
     //vLabNr = @QuestionUser("Geben Sie ddas LabNr des Patienten ein.", "")
     If vLabNr <> ""
     {
           // Get an empty result set
           vRS = @XResultSetSearch(@FN, "Auftrag", SEARCH_MODE_AND,SEARCH_SYNTAX_QA, "LabNr==")
           If vRS > -1
           {
                 XResultSetCreateNewRecord(vRS)
                 //XResultSetValue(vRS, "Key", @Number)
                 XResultSetValue(vRS, "LabNr", vLabNr)
                 XResultSetValue(vRS, "erfasst", @Date)
                 XResultSetClose(vRS)
           }
           Else
           {
                 @MsgBox("Error: failed to open result set.", "", "")
           }
     }
     Else
     {
           @MsgBox("Sie müssen ein LabNr für diese Pateint eingeben.", "", "")
     }


Your suggestions greatly appreciated.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: User Input Question
Reply #6 - Apr 14th, 2009 at 1:31pm
Print Post Print Post  
In which event do you have the code? Make sure it is On Element Entry.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: User Input Question
Reply #7 - Apr 14th, 2009 at 4:45pm
Print Post Print Post  
Hello Erika!

The Code is On Element Entry!
When i start from a main menu to a Form B  the function @PromptforUserInput() in the Form B does not react.
I noticed that it works well when i run the form B as Startup Form.

Why?

Thanks.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: User Input Question
Reply #8 - Apr 14th, 2009 at 5:22pm
Print Post Print Post  
If you replace all that code with a simple Writeln statement, do you see it?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: User Input Question
Reply #9 - Apr 14th, 2009 at 8:28pm
Print Post Print Post  
Yes, i see the  Writeln statement!
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: User Input Question
Reply #10 - Apr 15th, 2009 at 2:22pm
Print Post Print Post  
Quote:
Hello Erika!

The Code is On Element Entry!
When i start from a main menu to a Form B  the function @PromptforUserInput() in the Form B does not react.
I noticed that it works well when i run the form B as Startup Form.

Why?

Thanks.


Not seeing any problems here. Can you think of any circumstances that would make your case different? Is it possible that the @PromptForUserInput dialog is appearing behind some other window?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: User Input Question
Reply #11 - Apr 20th, 2009 at 4:46pm
Print Post Print Post  
which is a typo from me. My conditional command relates to the wrong variable and therefore appears no dialog.
Everything works fine.

Thank you Erika,
Thank you Mark .
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: User Input Question
Reply #12 - Sep 25th, 2009 at 10:35am
Print Post Print Post  
Hallo!

I have a small database SCANN.DB  (one Form and one Subform)  with @PromptForUserInput and @BMsgBOX and functioning properly. I merged the SCANN.DB in another application TOOLS.DB (with 10 forms).  Now  all @PromptForUserInput and @MsgBox no longer active in SCANN Form in the new TOOLS-application. Anybody who has a idea what i have done wrong?

For their support i am very grateful!
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: User Input Question
Reply #13 - Sep 25th, 2009 at 1:14pm
Print Post Print Post  
Are you changing the Warning Level of the application at any point? Either by using the WarningLevel() Sbasic command or the -warn_none startup switch or the "WARNING LEVEL:" INI file entry?
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: User Input Question
Reply #14 - Sep 25th, 2009 at 8:37pm
Print Post Print Post  
Quote:
Are you changing the Warning Level of the application at any point? Either by using the WarningLevel() Sbasic command or the -warn_none startup switch or the "WARNING LEVEL:" INI file entry?


Ray,
I have a WarningLevel(WARNING_LEVEL_NONE) without the ending WarningLevel(WARNING_LEVEL_SOME) on a Form Entry in the Startmenu.
that was my Mistake.

Thank you so much.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged