Breaking down a composite key in a data entry window (AREV Specific)
At 25 MAR 1998 04:55:07PM Paul wrote:
I have a file with a composite key defined as follows:
rack*shelf*bin where rack is 0*1, etc…
I've created a Data Entry window to maintain this file.
Sample layout:
Rack:
Shelf:
Bin:
Part No:
Part Desc:
Supplier:
In addition, I've defined a popup to be used from the Rack
prompt…when F2 is pressed
The popup is defined to break down the columns for each part
of the composite key…0*1, 0*2, 0*3
The key is returned from the popup…using K in the type of
info returned.
My problem is, when I return to the window all I have is the
first part of the composite key. How can I automatically fill
the remaining two portions of the composite key when pressing
enter from the Rack prompt (after having selected the record
from the popup).
Thank you in advance, anyone, for any help you can give me.
Paul.
At 25 MAR 1998 06:13PM Michael Slack wrote:
In the window, behind the prompts for the key parts, do you have the key part set? Highlight the prompt and hit SHIFT-F6. See if the Key Part is set, I suspect that it is.
Your question sounds like you could use the Post Prompt on the Rack prompt. The Post Prompt will call a subroutine that you create. The Post Prompt will only be executed after you leave the prompt. All you might have to do in the post prompt subroutine is redisplay the window or even just the prompts that are part of the multi-part key. I would be surprised if it required more than that.
Michael Salck
At 26 MAR 1998 10:12AM Paul wrote:
Michael,
The key part for each of the fields (Rack, Shelf, Bin) are
set to 1, 2 and 3 respectively with 0 in the position field.
The use of the post-prompt and calling a subroutine did occur to
me, but I've been led to believe that this task can be accomplished
by defining symbolic dictionary items. (ie. @ANS=@ID) I tried this but it didn't work. I also tried defining the symbolic items as ANS=FIELD(@ID,"*",X) where X is equal to 1, 2 and 3 respectively. I use the symbolic items defined in the Default field of each prompt
in the composite key. This didn't work either.
Paul
At 26 MAR 1998 10:19AM Aaron Kaplan wrote:
You're going to have to cut some code. @ANS is returned back into WC_IS% and not loaded into @ID, even for a key prompt.
You'll need to set @ID, and maybe WC_KEY_FULL$ to get the read processed. Optionally, going through the browse list logic might work as well.
apk@sprezzatura.com
At 26 MAR 1998 11:38AM Paul wrote:
Aaron,
I took your advice. I cut the following code and everything
is OK now.
CALL CATALYST('P','POPUPS*BINLOC')
@ID=@ANS
Thanks everyone, Paul