Unique CHOOSE values
Darren Reely
darren.reely at latticesemi.com
Tue Aug 15 18:13:01 CDT 2006
Fernando,
Well then, I don't think Quiz or QTP has the ability you want. You need
to cheat.
You could use an initial pass for the invoice number entry and write the
invoice numbers found in the primary record to a subfile. If I wrote it
properly, the following allows unlimited invoices to be entered, but
will only write an invoice number once to a subfile. I've added a
counter so you could check for duplicate entries. After this runs, your
normal program could just read the subfile.
access myfile
choose invoice parm prompt "Enter Invoice Number(s):"
define invoice_count num = 1
sort on invoice
set subfile name mysubfile at invoice
report summary invoice invoice_count subtotal reset at invoice
If it was critical that a duplicate entry not be allowed during entry,
then I'd have the user enter them via a screen to a custom table for the
purpose. That way with every entry, you could confirm that the number
had not already been entered. Once the entries are done, a designer
action could write out an appropriate input file that would be read by
your report or QTP job. Once that is done, you'd have another process to
remove those temporary input values.
One advantage of the screen is that you could also confirm that the
invoice numbers even exist. A disadvantage of course is the house
cleaning needed.
Darren
(wishing he was in Australia right now)
P.S. I've also sent this to the list so others can keep up to speed on
the question.
fernando.olmos at hpa.com.au wrote:
> Darren,
>
> Thanks for that. I tried it but unfortunately we require the user to be
> able to enter as many Invoice Numbers as they want, but of course we're
> trying to get them to enter in unique values. We need to disallow the
> user typing the same value in more than once.
>
> i.e.
>
> Enter Invoice Number(s): 1234
> Enter Invoice Number(s): 1235
> Enter Invoice Number(s): 1236
> Enter Invoice Number(s): 1234 <-- this should not be allowed
> Enter Invoice Number(s):
>
>
> -----Original Message-----
> From: darren.reely at latticesemi.com [mailto:darren.reely at latticesemi.com]
>
> Sent: Wednesday, 16 August 2006 4:12 AM
> To: Fernando Olmos
> Cc: powerh-l at lists.sowder.com
> Subject: Re: Unique CHOOSE values
>
>
> I think you want to use NOGENERIC, such as
>
> choose field nogeneric parm prompt "enter field: " 1 time ;;limited
> to 1 entry.
>
> Unfortunately this still allows someone to enter a wild card in the
> entry string. Unless your data has wild cards, it won't match. To
> disallow that, you'd likely have to have a preliminary pass that would
> edit check the entry. We would do that in our report request screens.
>
> Darren
>
> fernando.olmos at hpa.com.au wrote:
>
>> Is there a way to tell Powerhouse to accept only unique CHOOSE values
>> at run time?
>>
>> Thanks in advance.
>>
More information about the powerh-l
mailing list