Loading...
 
Features / Usability

Features / Usability


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

posts: 92

This is very similar to this topic:
http://tiki.org/tiki-view_forum_thread.php?comments_parentId=45722

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
and
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: 3665 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:

Copy to clipboard
{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.

 

HTH,

- 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.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting