trackerlist filtering by numeric values "in between" Posted by Uwe Altmann 18 Jan 2013 00:44 UTC I'd like to filter a trackerlist by a numeric value "in between". i. e. I got a field "km" with numeric values and want to show all entries which have a value bigger then 100 and less then 200 in field km. How this can be done?
Posted by Marc Laporte 18 Jan 2013 02:12 UTC See: PluginTrackerList Look for: less(val), greater(val), lessequal(val), greaterequal(val)
Posted by Uwe Altmann 18 Jan 2013 09:31 UTC Thanks Marc for the fast repy 😀 So I can use more of them at the same time (in the same trackerlist statement)? How is the syntax? What I got is {trackerlist trackerId="6" fields="44:45:46:47:48:50:51" ...filterfield="44" exactvalue="lessequal(259)" ... to cut the trackrlist in two parts. could I use ...filterfield="44" exactvalue="greater(125)" exactvalue="lessequal(259)"... to get only trackeritems with values between 125 and 159 in field 44? I think I tried once but it didn't work out for me.
Posted by Marc Laporte 18 Jan 2013 18:51 UTC I don't know. If you try just one, does it work? Best regards, M 😉
Posted by Uwe Altmann 18 Jan 2013 20:19 UTC The first line of code with just one filtefield/exactvalue does work perfectly. What I'm searching is to limit the items to a specified range with upper and lower limit.
Posted by Marc Laporte 18 Jan 2013 22:18 UTC Yes, I understand what you are trying to do. So I don't know if it's something that it was never designed to do, of if it's possible with a different syntax. Here are the commits, so you can look for hints: http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki?view=revision&revision=26226 http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki?view=revision&revision=28306 http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki?view=revision&revision=28323 Best regards, M 😉
Posted by Uwe Altmann 18 Jan 2013 23:14 UTC sorry - not a coder 😑 maybe one of the coders from this like sylvieg who put in the code for lessequal, less... in 2010 can tell more. But it looks that this is really flat programmed and allows only one criterium, no recursive action which would be needed for more than this. You know how to contact sylvieg?
Posted by jb22 25 Jun 2013 05:23 UTC Today I wanted to change my tracker filter to filter for two values - a text and an ID range. As I saw that there was never a solution posted to this thread, here it is. In order to filter for two fields do something like this: filterfield=>7:9 In my case field 7 is a username and field 9 a tracker element ID. To specify the values for those two fields you can do like this: exactvalue=>user:greaterequal(63)&less(1000) Here "user" is the value corresponding to field 7 and the statement after the colon the value range for the tracker element ID. The whole line could look something like this: TRACKERLIST(trackerId=>3, fields=>9:8, filterfield=>7:9, exactvalue=>user:greaterequal(63)&less(1000),) Hope this helps anyone
Posted by xhj967 26 Jun 2013 04:14 UTC also works like this: TRACKERLIST(trackerId=>3, fields=>9:8, filterfield=>7:9:9, exactvalue=>user:greaterequal(63):less(1000),) 😉 But it takes a textual filtering other than a numeric filtering in version 6.0! ie:100,40,30,200,5 greater(20)may have result 30,40,5 somebody know this problem? Thanks!