Re: Forms query on a non base table item

From: Bob Hirons <bob_hirons_at_hotmail.com>
Date: Thu, 22 Apr 1999 15:49:26 +0100
Message-ID: <371F36F5.92886FF5_at_hotmail.com>


I have now acheived the desired result using a PRE_QUERY trigger containing code similiar to that supplied below.
Thanks to all who responded.

Loyal Barber wrote:

> I have read several responses to your post and it appears that either I
> or everyone else missed the point. I believe the question was, how do
> you allow QUERY on a non-base table item. I have to make some
> assumptions
> here to make it work:
> 1. I assume you are in some way allowing them into something like
> enter-query mode.
> 2. I assume you are using the base functionality of key-execute-query or
> similar
>
> To accomplish this
> 1. check for not null condition in your non-base table item: customer
> name
> 2. If it is not null, dynamically set the where clause for the base
> table block based on
> a subquery from the customer table:
>
> WHERE customer_code IN (
> SELECT customer_code
> FROM customer
> WHERE UPPER(customer_code) LIKE
> '%'||UPPER(LTRIM(RTRIM(:b_order.customer_name)))||'%')
>
> 3. execute the query.
>
> Loyal Barber
> BLT Soft Incorporated
Received on Thu Apr 22 1999 - 16:49:26 CEST

Original text of this message