Switch to make pre-filters not apply when search filters are used

Discussion in 'Declined' started by deros, Sep 17, 2009.

  1. deros New Member

    Level: Community
    I am using a pre-filter to show only 2 weeks worth of records at a time, the problem is that when someone tries to search for something outside of two weeks, the pre-filters are preventing them from seeing anything, it would be nice to have an option to disable the prefilters when a search form, or search filter is used. Also the option would need to be on each pre-filter as there are some I need to always work.

    these are 2 of my pre-filters:

    this one hides any events before today
    this one hides anything over 2 weeks from today
  2. rob Administrator

    Level: Community
    prefilters are intended to be permanent - for your case would it not be better to present the user with a ranged date filter?
  3. deros New Member

    Level: Community
    We have that enabled, but we are also expecting 5000+ records and would like for their starting point to be today through next week so they dont have to spend time messing with filters if what they are looking for starts within the next week. The user base on this project is computer illiterate, the easier the better.

    Perhaps pre-filling in the date range filter with today + 2 weeks is that possible with something in the URL?
  4. rob Administrator

    Level: Community
    yes that should be :

  5. rob Administrator

    Level: Community
    ah hmm no cos the date is dynamic
    2 secs will try to figure that out....
  6. rob Administrator

    Level: Community
    ok you will need to update to the latest SVN then your querystring would be:

    index?tablename___time_date[value][]=now&tablename___time_date[value][]=%2B2 week&tablename___time_date[condition]=BETWEEN

    you need to use the "%2B" rather than the "+" in the url but they are equivalent.
  7. deros New Member

    Level: Community
    Close and Very cool, Here is the URL i used

    what it did was prefill in the values however the end date value was "+2 week" the result I got back was only the records for today, rather than between today and next week.

    Attached Files:

  8. deros New Member

    Level: Community
    Any updates on this, I'm still not getting the desired result, it's as if now and +2weeks simply get filled into the range box but not applied.

    Here is a direct URL so you can see what is happening

    Code (text):


Share This Page