[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Using a variable in an Input statement for the prompt



At 03:02 PM 10/25/2006, SandlerA@DFO-MPO.GC.CA wrote:
>Does anyone know if is possible for the prompt of an input statement to be a
>variable.  I am validating user input and would like to echo back to the
>user in the prompt part of what was input.
>
>I am using SQR version 6.1.3 with Maximo.  I cannot use SHOW because all
>show commands are written to the log (and not to the screen).  Also, I must
>work with this version of SQR; upgrading is not possible.
>
>Thank you,
>Aaron Sandler


Aaron, I think what you're asking is can the value of one input be 
incorporated into the input prompt of a second input.  Something like:

input $year 'Enter a year'
input $validate 'You entered 2006 - do you want to proceed'

Whereas 2006 is the value of $year.

I played around with inputs and had no luck, but I did have luck with ask 
statements and with a combo of ask and inputs.

For example, this works:

begin-setup

   ask $first_prompt 'Enter a value here'
   ask $second_prompt 'You entered {$first_prompt} above - do you want to 
proceed'
end-setup

And this combo of asks and inputs works:

begin-setup

   ask $first_prompt 'Enter a value here'
end-setup

begin-program
     input $second_prompt 'you entered {$first_prompt} above'
end-program

Maybe that will get you started.

Amy Eldridge
Miami University




>MIMS Technical Team |Équipe technique SGIE
>
>Canadian Coast Guard|Garde côtière canadienne
>
>Government of Canada| Gouvernement du Canada
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org
>http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users