[Solved] URL Filter: = works, but <> fails

pastvne

Bruce Decker
Hi All:
I have the following URL List filter that works:
Code:
?option=com_fabrik&view=list&listid=10&csp_document_control___division_code=Warehouse&resetfilters=1&clearordering=0&clearfilters=0

But when I make this simple change:
Code:
?option=com_fabrik&view=list&listid=10&csp_document_control___division_code<>Warehouse&resetfilters=1&clearordering=0&clearfilters=0

It does not work and returns zero records even through there are many records.
If I do the same query with advanced search, it returns results

It's probably something obvious but I'm not seeing it.
the division_code element is a database join but I'd expect that if the = works, that the <> should also work.
 
I don't think "not equal" works for URL-filtering. At least I cannot see this documented anywhere and it doesn't also work for me when tested.

Anyone correct me if I'm wrong.

You can use the filter other way around and add comma separated values like:
&tablename___whatever[condition]=IN&tablename___whatever[value]=1,2,3

Or have a link to another menu item where you have "not equals" pre-filter applied.
 
Of course, so simple. Sometimes I want to pound my head on the desk for missing what is obviously right there before my eyes in the wiki. Instead, I went to the forums and landed on this old article:
http://fabrikar.com/forums/index.php?threads/url-query-to-exclude-values.50026/

Where it indicates that <> should work in place of =.

If I had wiki edit privileges, I'd add an example of this to the filtering-via-the-url that covers this just for those who are oblivious as I can sometimes be!

I will note however that if you want to use <> in a URL link, it should be URL encoded like this:

Code:
&tablename___whatever[condition]=%3C%3E&tablename___whatever[value]=abc

So the < becomes %3C and the > becomes %3E as URL encoded representations of those characters.

Troester, Troester, Troester... What would we mortals do without you! Thank you very once once again!
 
According to RFC 3986 neither < nor > is a reserved character so the percent encoding should not be necessary:
https://tools.ietf.org/html/rfc3986#section-2.2
I found that I could enter it directly into the URL bar but there were difficulties if I attempted to build the URL into a hyperlink such as within the definition of a Joomla menu item. Using the encoding seemed to do the trick. So I think it was an issue, at least for me, in the definition of the hyperlink and not an issue at the browser level itself.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top