Normal Topic @Askuser() Question (Read 341 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
@Askuser() Question
Oct 5th, 2012 at 7:12pm
Print Post Print Post  
Is there a technique I can use to isolate a nothing selected versus a "No" selection with @Askuser?

Presently when I use @Askuser() nothing selected is the same as a NO selection so I end up using @Askuser() again when a non yes is chosen when I need to do something  different then just leaving the user at the originating spot. (See code below) or I use @PopupChoiceList   (see code further down below) but that takes a bit more to do and does not look as nice on the screen.

So basically what I would like is if I use @Askuser() I would have separate behavior for a yes a No or nothing selected.

Thanks

PopupSelectPosition(3, 250, 150)
           If @Askuser("Can you Identify ","The Following?","The Referring Dr, The Salesperson, The Type of Procedure Ordered")

           Then
                 {      

                 GotoTabPage(LE41, 2) // 05 tab of oe            
                 forceredraw()      
                 NormalScript()
                 }

           Else

                 {      

                       If @Askuser("You said you could not identify ","The Referring Dr, The Salesperson or The Type of Procedure Ordered","Do you want to Enter a Temporary Order?")

                       Then

                             {      

                             GotoTabPage(LE41, 3) // 01 tab of oe            
                             forceredraw()      
                             ProblemScript()
                             }
           

                 }      


//// another way

var vResult as string
var vChoices as string
     
     PopupSelectPosition(3, 250, 150)

     vChoices = "    ;"  +
     "Yes;" +
     "No;"

     vResult = @PopupChoiceList(vChoices, "Can you identify The Referring Dr, The Salesperson and The Type of Procedure Ordered")

     if vResult = "Yes"
     {
                 GotoTabPage(LE41, 2) // 05 tab of oe            
                 forceredraw()      

     }
     else      if vResult = "No"
     {

                             GotoTabPage(LE41, 3) // 01 tab of oe            
                             forceredraw()      

     }
  

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



Posts: 243
Joined: Jan 29th, 2010
Re: @Askuser() Question
Reply #1 - Oct 6th, 2012 at 2:39am
Print Post Print Post  
The Programming Guide says @AskUser requires a Yes or No answer. You should be able to substitute a @FormAsDialog to distinguish No from no choice.
  
Back to top
 
IP Logged