Open an INQUIRY from a scrolling INPUT
Open an existing INQUIRY for the selected row without asking for the key a second time. The Key Entry example uses an INQUIRY constrained to one record.
Constrain the INQUIRY child
Constrain the INQUIRY child to the current INPUT record. Set
--- PROCESS CODE to DISP before invoking the INQUIRY. In the Key Entry frame's Global Pre-Display event point, run this ILF.
*
* RETURN to Display, 1st time thru
*
IF --- PROCESS CODE EQ DISP
T SET --- OPTION = RETURN
T SET --- PROCESS CODE = DONE
*
* END to go back to INPUT, 2nd time thru
*
F IF --- PROCESS CODE EQ DONE
FT SET --- OPTION = END
(All this can be done in a SUBR, called from Key Entry's Global Pre-Display event point.)
When the INQUIRY starts, PROCESS CODE is DISP, so the KEY ENTRY frame is skipped. Since the INQUIRY is constrained to one record, it displays only that record from the INPUT.
When the user presses ENTER or END after viewing the data, Key Entry executes again, but since PROCESS CODE is now DONE, it sets OPTION to END. INQUIRY ends, and control is returned to the parent.
Try two different rows and verify that each opens its own record.