Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 May 2011 at 08:14 UTC
Updated:
21 Sep 2011 at 09:48 UTC
Would it be possible to activate an option in numeric filter so when you enter "20", the values shown are "20" and "-20"?
Comments
Comment #1
dawehnerHuch? This is a bit confusing. In general you can solve all this if you enable ctools module and add the global: math field.
This allows you to apply some formulas to it, and based on this there is no problem to run abs() aor whatever you need.
Comment #2
enboig commentedI haven't tried ctools; I was asking for views to generate a query similar to:
Comment #3
dawehnerSo this is not really working.
It's cool if you could actually now what the people want.
Comment #4
merlinofchaos commentedUnfortunately, Views does not currently provide a feature to do this. Doing so would require a custom handler or query modification. Views is unlikely to provide a feature like this.
Comment #5
enboig commentedOk, I have coded a custom handler:
which is the same as 'views_handler_filter_float.inc'; its just ads "ABS()" to the query and the values.
I think a better approach would be to add an option to the form, and make it available for float and non float numeric values.
I can send a patch for views2 if you care.