Features / Usability

Features / Usability

Trackerlist: possible to filter on multiple values in one query?

posts: 92

This is very similar to this topic:

I'm wishing for a way to filter on multiple values in trackerlist.

Say I have
field 1 = "firstname"
field 2 ="lastname"

and I want to get all of the people in the tracker with the last name "Doe" and the first name either "John" or "Jane".

I tried both
Missing or incorrect trackerId parameter for the plugin. List Trackers
Missing or incorrect trackerId parameter for the plugin. List Trackers

But neither worked.

Is there a way to make it work? If not, do you agree this would be very useful? Not my silly example of course, but there are certainly more practical cases.

I'd be surprised if this is not already requested. I tried checking if there is a current wish, but I could not get the filter to return anything at all.

posts: 3623 United States

I'm not sure that your "or" operator (i.e., using | ) is supported by the TRACKERLIST plugin. At least, I don't see anything mentioned in the docs.

Maybe you can use the TRACKERITEMFIELD plugin to test the value of the last name? You can construct and IF...ELSE test pretty easily:

{TRACKERITEMFIELD(trackerId=1, fieldId=1, test="John"} match found {ELSE}{TRACKERITEMFIELD(trackerId=1, fieldId=1, test="Jane"} match found {ELSE} No match {TRACKERITEMFIELD}

You might also want to look at the LIST plugin. IIRC, it can use boolean expressios (e.g., AND, OR) in its filters.



- Rick  |  My Tiki Blog |  My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.