Re: Multi table in one datablock

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: 2000/05/30
Message-ID: <sj943hhc5pj129_at_corp.supernews.com>#1/1


"Gerben Braakman" <G.Braakman_at_NOplanetinternetSPAM.nl> wrote in message news:392E5A01.197B8857_at_NOplanetinternetSPAM.nl...
> Hi,
>
> Can anyone explain how to solve the following :
>
> We want to create a form in which search criteria can be entered in a
> number of fields. There is only 2 tables in a master-detail relation;
> both master and detail fields must be accessible and enterable.
>
> The problem is that if a screen like this is generated, 2 datablocks are
>
> created; when entering search data in one of the master-fields, it is
> not possible anymore to put data in the detail fields.
>
> How to create a form like this?
>
>
> Thanks.
>
> Gerben

If I understand correctly, you want to prohibit entry of data in detail fields if any of the master fields are entered?

If so, probably use a block-level WHEN-NEW-RECORD-INSTANCE trigger on the detail block:

if master_block.master_block_item1 is not null or
   master_block.master_block_item2 is not null or
   master_block.master_block_item3 is not null or
   master_block.master_block_item4 is not null or
   master_block.master_block_item5 is not null or
   (etc...you get the idea)
   master_block.master_block_item6 is not null THEN    set_item_property(detail_block.detail_item1,enabled,property_false);
  • Do for all detail_block items as needed end if;

Or, you can also do it in a WHEN-NEW-BLOCK-INSTANCE block-level trigger on the detail block. If you do that, I think there's a set_block_property where you can set it to query-only (not sure offhand).

-Matt Received on Tue May 30 2000 - 00:00:00 CEST

Original text of this message