Re: Master - Detail Blocks , Query ???

From: Andrew Kirkbride <amk_at_ozemail.com.au>
Date: Thu, 3 Dec 1998 21:09:36 +1100
Message-ID: <745nji$34g$1_at_reader1.reader.news.ozemail.net>


Hi,

You can only query one block at a time. If you query the child block records within the subset that relate to the parent block will be returned.

You could create a pop-up window based on a control block so the user can enter search criteria into non-base table items, then set the default where clause on the parent block using an exists subquery for the items on the child block (see set_block_property built in).

Depending upon the business requirements you could create a view that joins the two tables, then you have one block in which you can query all fields. By setting the number of items displayed property you can make it look like a single row parent block and a multi row child block. Only problem is you'll end up with duplicates in the pretend parent block and you'll only be able to update pretend child rows (though you'll need to set the update changed columns property on the block for that to work).

Regards,
Andrew.

plprasad_at_my-dejanews.com wrote in message <7445bj$6ur$1_at_nnrp1.dejanews.com>...
>Hello,
>
>I hava a master-detail relation between two blocks in my Forms 4.5 form.
>
>The user wants to query based on some criteria from both master and detail
>blocks. Is it possible ?
>
>The next question is, if the user enters only criteria for the detail
>block, is there any way, we can get the master record, pertaining to
>the detail records fetched ? (I tried querying the detail and it fetches
>only the detail records without the master record)
>
>Any help appreciated.
>Thanks in advance.
>Prasad.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Dec 03 1998 - 11:09:36 CET

Original text of this message