Re: setting query parameters for blocks at runtime

From: DanHW <danhw_at_aol.com>
Date: 23 Aug 1999 22:28:53 GMT
Message-ID: <19990823182853.21816.00003927_at_ng-fm1.aol.com>


>I have seen examples of setting query parameters for a block at runtime by
>creating a string e.g., '# in (123, 124, 125) and then copying the string to
>a text item in the block's pre-query trigger. If the string is copied to
>the record_id text item, i assume that the string functions as a where
>clause, returning only records with record_id = 123, 124, and 125 when the
>base table is queried.
>
>Is it possible to narrow the query further by creating additional strings
> like the one mentioned above ) for other text items? For example could you
>copy the string '# in (jones, smith, doe)' to the customer_name text item
>and return records only were the record_id is 123, 124, 125 and the
>customer_name is jones, smith, doe?
>
>I have tried this, unsuccessfully so far, but thought that I might be
>syntaxing it wrong.
>
>Any advice is appreciated.
>

It is usually easier to use the block property DEFAULT_WHERE, rather than stuff things into real fields (what if the user put something in it? try arbitraily ending the quotes and parenthese correctly. It can be done, by why do it the hard way...)

This is not limited by the query size of what ever field you chose to put your additions in, and as I mentioned, it is simpler syntax to add in.

Dan Hekimian-Williams Received on Tue Aug 24 1999 - 00:28:53 CEST

Original text of this message