Subject Re: [IBO] How would I go about making a grid show this classification
Author Antti Kurenniemi
>>I set the classification query's masterlink to the intermediate
>>and the MasterLinks property to "id=custtoclass.classid" (custtoclass is
>>intermediate table), isn't that right? What next?
> A very good question! This is what you would expect if each of your
> queries is "select * from..." The master-detail linking chain in this
> case
> selects the *first* record where there is a full match across the three
> sets. The way I described it, you don't have a way to see all of the
> corresponding classification records simultaneously. Sorry about that.
> As far as the middle set is concerned, it doesn't matter that the
> detail-master linking is looking at just the first intermediate
> record. The trick is to capture the current customerid from that set and
> parameterise the last query to capture *all* of the intersecting
> classification records for that customerid.
> e.g. the SQL for the classification set would be:
> select CL.classid, CL.classdescription from classification CL
> where exists
> (select CC.classid from custtoclass CC
> where CC.customerid = :customerid)
> The magic happens by using MasterParamLinks on this set, instead of
> MasterLinks:
> classification.customerid=custtoclass.customerid
> Hope this is the missing link in the chain. :-) Sorry to have misguided
> you on this.
> Helen

Hehe, now I get no rows in the customers classification... But, there is no
error, so it seems the queries are at least ok in syntax. Here's a thought:
this is a larger app in which I'm testing a lot of other stuff as well, so
what about if I make a sample app that has only this master-detail-detail
thingie, and you help me make it work - maybe it could be useful to others
as well as a sample?

Another question: if I use the MasterLinks and/or MasterParamLinks
parameters, is there a way for me to catch the actual resulting queries, and
see what they look like? I think that might at least help me understand how
everything works.

Thanks again,
Antti Kurenniemi