Re: Problem with data block "where" clause

From: Andy Hardy <>
Date: Tue, 25 May 1999 10:47:08 +0100
Message-ID: <>

[Quoted] In article <>, Dean Peterson <> writes
>I have a form that has two blocks, a control block and a data block. The
>purpose of the control block is to provide the user with two fields, one
>to enter the name of a column in the data block table, and the other to
>enter a column value so a search on the combination can be performed.
>The where clause in the data block reads as follows:

So you have a database table called ctrl_block and your data block uses this for its base table?

Probably not. The WHERE clause needs to be a valid SQL statement for the base table of your block - all that happens when Forms does a query on the block is that it sticks a 'WHERE' and the where clause onto the end of the SQL statement.

It sounds like you need to use the set_block_property to change the where clause when you've set the control block to the values you like. Something like:

        set_block_property('data_block', default_where, :ctrl_block.field_name||' like %'||:ctrl_block.field_value||'%');

Andy Hardy. PGP key available on request
Received on Tue May 25 1999 - 11:47:08 CEST

Original text of this message