Re: Developer 2000 4.5 - How do I Display data from a table outside the base block -

From: QuadTwin <quadtwin_at_aol.com>
Date: 1997/09/27
Message-ID: <19970927132101.JAA17162_at_ladder02.news.aol.com>#1/1


[Quoted] crocodileBill <crocodilebill_at_hotmail.com> wrote:

> How do I display data from a table that is outside the block for the
> form. For example I am using some code tables and wish to display the
> code description. I have defined a display item and have attempted to
> use a form level trigger when-new-record-instance in combination with
> a select clause, but I am getting in a bit of trouble with this.

Dear Croc,

WHEN-NEW-RECORD-INSTANCE only covers the case of [Create Record]. You also need to consider an update and a query. So the typical solution is to create a function to execute the DML statement and return the description. Then call the function from a WHEN-VALIDATE-ITEM trigger on the item you need to describe and a POST-QUERY trigger on the block that gets the description for the item you query. Discard your WHEN-NEW-RECORD-INSTANCE because when a new record is created, the item value is null. Use the Default Value property in place of WHEN-NEW-RECORD-INSTANCE if you need to give either the item or the description a default value.

Hope this helps,

Al Lawson
Interactive Group, Inc.
www.interactive-group.com
lawsona_at_interactive-group.com Received on Sat Sep 27 1997 - 00:00:00 CEST

Original text of this message