Re: Exclusion list in a query-by-example
Posted in 1997
I am posting this first to acknowlege & thank those who helped me here, but also to expand on the idea for general public knowlege. Nils Myklebust wrote: > > Jacob Salomon <jake@apparel.net> wrote: >:Thanks to XXXXX@YYYYYYYY.ZZZ who supplied me with the definitive *no*. >:I have blanked out the person'n e-mail addr - If he had wanted it >:posted, he would have done so. > >It's true that it's a definitive *no* if you use the construct >statement and do nothing else. The construct statement will however >genereate "state in ('NY', 'NJ', 'MN')" if the user types NY|NJ|MN in >the field. What we have done is to have some extra way for the user to >indicate that this is an exclusion (it may be a function key, a menu >selection or some such). Than we modify the generated where clause >programatically to include the not (after the user have left the >construct statement). You may not find it pretty, and it isn't always >easy if there are many fields that may be include or exclude but it is >possible in some special cases. Nils (and M.S. who mailed me a similar, if less detailed solution), fortunately, my situation only calls for this "schtick" in one field on the form. It sounds like the function key method would be the best attack for the problem, if the end users were willing to learn a new function key (where talking about CD-ROM drive == cup-holder crowd here). The big trick here is invagling an INPUT ARRAY into the middle of a CONSTRUCT statement; the function key is my door into this INPUT. Someone had suggested a flag field next to the field with the exclusions list; if set to N, I would manipulate the constructed WHERE clause to place a NOT between the column name and the word "in". The difficulty here is also removing the flag-fields column name (a la formonly) from the constructed WHERE clause. (If set to "Y", the I would still have to manipulate the constructed clause to get it out of there.) Not impossible but somewhat more awkward than simply tacking the NOT IN clause to the end of the constructed clause. Thank you both for reopening this can of worms. I suddenly feel like going fishing! ;-) -- -- Jake (With renewed hope in the probably impossible) . . _..-'( )`-.._ ./'. '||\\\\. }\\_/{ .//||` .`\\. ./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\. ./'..|'.|| |||||\\`````` \\'@'/ ''''''/||||| ||.`|..`\\. ./'.||'.|||| ||||||||||||. | .|||||||||||| ||||.`||.`\\. /'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\ '.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.` '.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.` |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\| V V V }' `\\ /' `{ V V V \\ \\ \\ V / / / +-----------------------------------------------------------+ | Impeccable Logic: A thought process which successfully | | resists chicken bites | +-----------------------------------------------------------+