Re: Arced, Multiple, Master - Detail

From: Geoff White <whiteg_at_ccis.adisys.com.au>
Date: Mon, 21 Dec 1998 11:44:49 +0800
Message-ID: <367DC431.67BBC597_at_ccis.adisys.com.au>


 Jochen Van den Bossche wrote:

> I have allredy anwered some questions in this use newsgroup, now it is
> my time to ask one...
>
> Imagine a forms with four blocks:
> One control block (CONTROL)
> 3 Master blocks (CLIENT, STAFF, USER_CLASS) set to only allow query.
> one detail block (NETWORK_SYSTEM_ACCESS)
>
> The NETWORK_SYSTEM_ACCESS table/block contains 3 FK items to each of the
> 3 masters (CL_IS_NR, STF_ID_NR, USRCLASS_ID_NR). Every master block has
> a relation to the detail.
> Only one of these FK may be filled in: an arc. This means that a
> NETWORK_SYSTEM_ACCESS is for a CLIENT xor for a STAFF xor for a
> USER_CLASS. (xor: eXclusive OR)
>
> The control block has a radio group that is displayed on the first
> canvas. This radio group hasd a when-radio-changed trigger attached.
> This triggers displays one of three canvasses, each showing one of the
> master blocks. That means that if the user clickes the client radio
> button a canvas appears with the client block.
> Showing these blocks is not my problem. I use stacked canvassses and use
> hide_view() to hide two of them and go_block() to display the other
> (selected) one.
> <snip>

> HERE COMES THE PROBLEM:

> Any solutions?
> How do I delete these fields, or set them to null?

One solution is:
I n your when-radio-changed trigger go_block('client') and clear_block before you go to the staff block. The mechanics of your problem is that the key is copied into the detail block via the Property Palette -> Data -> Copy Value from Item property. While there is a value in the parent block it will be copied down to the child block when a new instance is created.

HTH Geoff Received on Mon Dec 21 1998 - 04:44:49 CET

Original text of this message