[Zope] ZCatalog: How to request boolean NOT searches?

Doug Morse Doug Morse <morse@pobox.com>
Mon, 27 Nov 2000 21:45:04 -0600


Hi,

I have what I'm hoping is a simple question.  I've setup a search form
against a ZCatalog using field searches and everything works great.  In the
search form, I have the following code (also works OK):

    <dtml-call "REQUEST.set('sort_on','date')">
    <dtml-call "REQUEST.set('sort_order','reverse')">
    <dtml-call "REQUEST.set('meta_type','News Item')">

What want to do, and can't seem to figure out, is to call REQUEST.set to set
a logical NOT value.  For example, I've tried the following for the goal of
making the author field NOT EQUAL to the specified value:

    <dtml-call "REQUEST.set('author','NOT John Smith')">
    <dtml-call "REQUEST.set('author','<> John Smith')">
    <dtml-call "REQUEST.set('author','!= John Smith')">

but none of these work (of course, I'm just guessing at syntax). Can anyone
tell me how I SHOULD be setting a logical NOT condition in this example?

Thanks so much!
Doug Morse
morse@pobox.com