Re: Forms 4.5 'OPEN QUERIES'

From: Bhaskar Gandavabi <bgandavabi_at_ix.netcom.com>
Date: 1998/03/28
Message-ID: <6fj4gk$a69_at_dfw-ixnews5.ix.netcom.com>#1/1


Darren,

I have always used the method of checking at pre-query for null queries.

You can try: get_block_property('block_name',last_query) and find string 'where' in it. If it does not exist, it is a null query.

But, check if it will work at pre-query. Because, What if it takes the previous query and not the current query. I think you can test and then use it.

Imagine, u have a default where condition, then this will not give you the right result because, it will surely have a where clause. You can play around this and find out.

Anu.

Darren Palmer wrote in message <6fhbuh$gt6$1_at_mendelevium.btinternet.com>...
>Dear all,
>
>I have a form with a single block with a number of items on it.
>
>I want to stop the user executing a query with all fields blank.
>
>The way I currently do it is to check that all the fields are NOT NULL
>in the pre query trigger. Although this works it strikes me as messy.
>
>Also for numeric fields if the user types >100 (to retrieve all records
>greater than 100)the pre query triggers raises a value error because the
>NOT NULL check expects the item to be a numeric and at that point it
>isn't. It is messy isn't it.
>
>
>Maybe there is a way to query the block's where clause just before it is
>submitted and if it is NULL then bounce it. I have tried this but the
>block's where clause is always NULL.
>
>
>Thanks in advance
>
>Darren
>
>
Received on Sat Mar 28 1998 - 00:00:00 CET

Original text of this message