1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Tricky filtering records

Discussion in 'Community' started by Trembowiecki, Sep 11, 2020.

  1. Trembowiecki

    Trembowiecki Member

    Level: Community

    I need to do a tricky filtering in my list, based on one element (databasejoin). The thing is - I don't want to display one record based on the searched term only, but also five 'previous' and five 'next' records, based on the order of the dropdown list generated by databasejoin element.

    Example: let's say my dropdown list consists of numbers from 1000 to 1500. If I choose 1200, I want my list to show records, which contain 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204 and 1205. It may look silly, but believe me, I have to see 'context' of every filtered record. Is it possible in the first place?


  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Not built-in.
    You can try to use a php-events list plugin to modify a list filter https://fabrikar.com/forums/index.php?wiki/php-events-list-plugin/
    (little documentation, I only use the "OnQueryBuildWhere", but this is only ADDING conditions). Something like
    Code (Text):


    if (count($f)==0) return;
    if (in_array('220',$f['elementid']) ) //your dbjoin element was selected
    //do ...
    you can use a search form for selecting the dropdown and use a redirect with URL list filtering.
  3. lawmaina78

    lawmaina78 New Member

    Level: Community
    Please elaborate more, how do you add condition in "OnQueryBuildWhere"
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    juuser likes this.
  5. lawmaina78

    lawmaina78 New Member

    Level: Community

Share This Page