No Duplicate in Quick
Joe Boyle
joeboyle_adt@hotmail.com
Mon, 25 Oct 2004 20:16:15 +0100
and if you have RDB but with a PH version that does not allow cursor syntax,
you could try 'lookup on' as below,
screen test_lookup_noton_nonidx_byfil
file myfile primary occurs 18
file myfile alias c_myfile reference
access using fieldtext via txt_nodup_field
select if key_no of myfile ne key_no of c_myfile
temporary tocc reset at startup
cluster occurs with myfile
field key_no of myfile required nochange &
lookup noton myfile
field txt_nodup_field of myfile &
lookup on c_myfile optional nowarn
cluster
procedure input txt_nodup_field
begin
let tocc = occurrence
for myfile
begin
if fieldtext = txt_nodup_field of myfile &
and occurrence ne tocc
then error = "value already exists in occ'nce " &
+ ascii(occurrence)
end
end
procedure edit txt_nodup_field
begin
if accessok
then error = "value already exists in file"
end
build
Regards, Joe.
This e-mail and all information contained in it is confidential and may be
legally privileged. If you are not the intended recipient, your access to
this e-mail is unauthorized. Any use, dissemination, distribution,
publication or copying by you of this e-mail or any of the information
contained within it is prohibited and may be unlawful. Do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. The content of this
e-mail and any attachments sent with it may have been altered without the
consent or knowledge of the author.
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Lloyd, Gavin
Sent: 22 October 2004 13:10
To: Peter Bateman; powerh-l@lists.sowder.com
Subject: RE: No Duplicate in Quick
This has been going on for a while but I can't resist asking why 'Lookup
Noton' has not been used (unless data structure permits it and this is
just a warning). Then you would get the 'Same as occurrence (..)'
error.
Regards,
Gavin.
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Peter Bateman
Sent: 21 October 2004 18:22
To: powerh-l@lists.sowder.com
Subject: RE: No Duplicate in Quick
Brian:
I take your comments as compliments. Thank you.
As to how I got to the solution which Georgia has implemented.
There are a few things that we want to achieve when we are doing
software maintenance.
1) Address the underlying issue. In Georgia's case, users were
duplicating previous values with the duplication shortcut key
instead of entering correct data. However, in some cases duplicates
of previous values were correct. Users don't intentionally mess up,
but
if the can go wrong without warning they will.
2) Minimise the impact of the changes on the rest of the system.
We could for example 'hide' the duplicate key in the QKGO
and then program for '_' in the input procedure for every field
on every screen that we want to allow the shortcut on. Needless,
to say nobody would want to do this just so that the users would
be force to enter something ( which could be the previous values )
into two fields on one screen.
3) Minimise the impact of the changes on the users.
We could for example 'hide' the duplicate key in the QKGO
and then put the DUPLICATE option on every field on every screen
that we want duplicate allowed on. Now not only is this a lot of
work but the users would have to learn a new way of entering data.
It would also invalidate any QKIN files that use '_'.
So with these 3 objectives in mind I came up the solution of warning the
users if a critical field has been duplicated either by using the
shortcut or by entering the same value over again.
Regards,
Peter Bateman
_________________________________________________________________
Powerful Parental Controls Let your child discover the best the Internet
has
to offer.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU
=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN(r) Premium right now and get
the
first two months FREE*.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.