Re: LOV Question

From: Neville Sweet <sweet.neville.nj_at_bhp.com.au.no_junk_email>
Date: 1 May 1998 06:19:44 GMT
Message-ID: <01bd74c8$c35a5400$45f11286_at_itwol-pc3963.itwol.bhp.com.au>


Jason,

An On-Update trigger is unnecessary for what you have described, since ID is part of the block's base table.

Try the following:
CUSTOMER Block Items:
NAME is non-base-table
ID is base-table and non-display (null canvas)

LOV:
Name, return value to CUSTOMER.NAME (must be 1st column in record group) Description, display only
Id, non-display, return value to CUSTOMER.ID

Set NAME Property LOV for Validation (assuming its appropriate). Decide on LOV display method, eg. When-Mouse-Double-Click trigger on NAME.

For testing purposes, temporarily display the CUSTOMER.ID on the canvas.

Once you get that working, consider the following: In a Post-Query trigger, lookup and populate NAME based on the value of ID. Add a When-Validate-Item trigger to NAME:   If ID is mandatory, if NAME is null then raise form_trigger_failure.   If not mandatory then clear ID if NAME is null (LOV for Validation won't do it for you).

Jason Boesch <jgboesc_at_uswest.com> wrote in article <3548C35D.2E6695E7_at_uswest.com>...
> Thank you very much for your suggestions but I'm still having problems.
After
> reviewing my first message I don't think I explained my problem very well
so
> allow me to try again:
>
> I have two tables: FORMAT_CHOICES, and CUSTOMER.
>
> FORMAT_CHOICES has three columns: ID (primary key), NAME, DESCRIPTION.
The LOV
> is based on this table.
>
> CUSTOMER has a column called FORMAT_ID which has a foreign key relation
with
> FORMAT_CHOICES.ID.
>
> In my text field I want to display NAME. When the user brings up the
LOV, they
> should see NAME and DESCRIPTION but not ID.
>
> After making their selection, only the new value of ID needs to be update
in the
> CUSTOMER table.
>
> Hopefully that makes more sense and you can point me in the right
direction.
>
> Thanks again!
>
> --
> Jason Boesch
> jgboesc_at_uswestREMOVETHISFIRST.com
>
>
>
Received on Fri May 01 1998 - 08:19:44 CEST

Original text of this message