Subject Keysource & Master Relationships Problem
Author Bob
There's something I do not understand going on here.
I have a master dataset called Ticket. A second dataset (Lading) feeds a
LookupCombo on the Ticket screen, allowing the user to select a Lading.
Finally, dataset Booking is tied to Lading via a MasterLinks relationship,
so I get the booking that goes with the Lading that the user selects.

This all appears to work fine. The problem is when I attached an OnChange
event to the LookupCombo to do this:
qrTicket['CUST_ID'] := qrBooking['ORIG_ID'];

When that line of code is in there, I am only able to change the LookupCombo
to other entries in the lookup list (Ladings) that have the same Booking ID
as the currently displayed Lading. For example, if I am displaying Lading
1234 that has BOOK_ID = 31, I can only select other Ladings that have
BOOK_ID=31. I cannot select a Lading with a different BOOK_ID.

If I remove the LookupCombo OnChange code, the user can select any Lading
they want to.

I feel I'm missing something conceptually here. Can someone help? Thanks.

Bob.


qrTicket.
SELECT TICK_ID
, LADING_ID
, CONT_ID
, CUST_ID
, COMM_ID
FROM TICKET
KeyLinks : TICK_ID
RequestLive : true

qrLading, which is used to provide lookups for a field in qrTicket via a
LookupCombo.
SELECT LADING_ID
, LADING_NUM
, BOOK_ID
FROM LADING
KeyLinks : LADING.LADING_ID=TICKET.LADING_ID
KeySource : dsTicket

qrBooking, which gets the booking that's associated with the currently
selected Lading.
SELECT BOOK_ID
, ORIG_ID
, DEST_ID
, O_CONT_ID
, D_CONT_ID
FROM BOOKING
MasterLinks : BOOKING.BOOK_ID=LADING.BOOK_ID
MasterSource : dsLading