PxPlus User Forum
Main Board => Discussions => Language => Topic started by: Peter.Higgins on February 07, 2020, 10:15:36 AM
-
I am curious if it is possible to make an alternate multi-segment key unique in the dictionary where the secondary segments may repeat for other primary segments but should not for the primary segment which is also the first segment of the prime key? Thinking no-way but hope to be surprised.
-
I'm not certain I follow what you are looking for, but in the primary key for any file MUST be unique.
Given this; if the full primary key is part of an alternate key, that portion of the alternate key will be unique and thus logically you will never have duplicate alternate keys regardless of whether you tell the system they are unique or not.
-
Thanks Mike,
The original creator of this key obviously had not worked with record scrolling in BBX emulation mode or they would have known how good an idea that is.
-
Peter,
Generally I always suggest that you never allow duplicate alternate keys as it makes the logic to traverse the key chain challenging especially if you are trying to scroll or page through the data.
Trying to re-establish the proper current record when using a key that allows duplicates is much more difficult.