Multi-part keys in Arev windows (AREV Specific)
At 18 DEC 2003 03:03:14PM Joshua Saks wrote:
I have a table with a multi-part key. The first key part is required. The second key part is optional. How can I create a window where the second part of the key is an optional field? Key fields seem to be required.
At 18 DEC 2003 03:29PM Jonathan Bird wrote:
I had the same problem a while ago. The best way around it, rather than having "blank" key fields, is to use a ZERO when it should be blank, than pop a user defined conversion on the field to make it look BLANK. Make the default for the key entry ZERO, and the user won't know….
Got the code and a illustrative window here, if you want it…email me at
At 19 DEC 2003 07:41AM Don Miller - C3 Inc. wrote:
Joshua ..
First, it's generally not a good idea to make any part of a multi-part key OPTIONAL. That said, it is possible to use a "don't-care" element for the "missing" part. I frequently will use a zero (0) for this with a "blank-when-zero" output conversion to simulate this situation. You WILL have to account for this anomoly in reporting and queries, though.
HTH
Don M.
At 19 DEC 2003 09:10AM Cameron Christie wrote:
As other responses to date indicate, it really IS a bad idea in design terms to have optional key parts. An alternative is to use a sequential (or random) key with your existing key data relegated to subsidiary positions, but indexed accordingly to allow secondary key retrievals.
If you can give us a clue WHY you want to do this, we might be able to suggest some other possibilities for you.
At 02 JAN 2004 01:43PM Joshua Saks wrote:
I am porting code from Rev. G. This was not a restriction in Rev. G, and I am trying to maintain the same functionality and user interaction. The two key fields are customer number and distribution center number. Not all customers have distribution centers, and a distribution center=" in Rev. G worked just fine.
Thanks for any thoughts or suggestions.
At 02 JAN 2004 02:20PM Donald Bakke wrote:
Joshua,
When you say "this was not a restriction in Rev. G" were you using PGMR/SCR or was this a custom programmed form?
dbakke@srpcs.com
At 02 JAN 2004 03:06PM Joshua Saks wrote:
The form was a PGMR/SCR screen. The second part of the key was "O"ptional. I am trying to replicate the same functionality in ARev.
At 03 JAN 2004 04:22AM The Sprezzatura Group wrote:
It is difficult without programming as the system is set up to prevent this from happening so you have to program around this. There have been several suggestions in this thread as to how you might achieve what you want.
As an aside it is fascinating that you are moving to
AREV rather than OI from Rev G.
The Sprezzatura Group
World Leaders in all things RevSoft