ZCatalog: searching for all results that *don't* match
Hi all I'm sure this is dead simple, but I'm not getting it. How do I do this? :: brains = catalog( Status != 'dismissed' , meta_type = 'Reminder' ) Specifically, that "!=" inequality condition. I want all reminders that aren't dismissed. Regards, Jean
On Mon, 10 Dec 2001 16:22:57 +0200, "Jean Jordaan" <jean@upfrontsystems.co.za> wrote:
Hi all
I'm sure this is dead simple, but I'm not getting it. How do I do this? ::
brains = catalog( Status != 'dismissed' , meta_type = 'Reminder' )
Specifically, that "!=" inequality condition. I want all reminders that aren't dismissed.
If you know all possible status values: catalog( Status = ['outstanding','cancelled','anything else'] , meta_type = 'Reminder' ) Toby Dickenson tdickenson@geminidataloggers.com
Hi Toby
If you know all possible status values:
catalog( Status = ['outstanding','cancelled','anything else'] , meta_type = 'Reminder' )
Thanks! Currently, the Status is either 'dismissed' or nothing, so for me that means:: catalog( Status = [''] , meta_type = 'Reminder' ) which works! :) I'd already tried the following, which did not work:: catalog( Status = '' , meta_type = 'Reminder' ) It returns all reminders. One other possibility I'd thought of is to give the Reminder ZClass an 'isDismissed' method, which does 'return Status == "dismissed"', and index that. But that seems rather heavy for something this simple. I'm going with the 'Status = ['']' idiom for now. Regards, Jean Jordaan
On Mon, 10 Dec 2001 17:09:29 +0200, "Jean Jordaan" <jean@upfrontsystems.co.za> wrote:
I'd already tried the following, which did not work::
catalog( Status = '' , meta_type = 'Reminder' )
Theres probably a boolean test inside the ZCatalog. Your first attempt would have worked if your Status values were either ('Dismissed' or 'nothing'), rather than ('Dismissed' or '') Toby Dickenson tdickenson@geminidataloggers.com
participants (2)
-
Jean Jordaan -
Toby Dickenson