Filtering for empty rows in databasejoin element using dropdown

VOI

Member
Hi,

I would like to filter for the rows in a list with no entry in a databasejoin element.With the following set-up of the databasejoin element I cant get this to work - nor with list filters neither with advanced search.

The databasejoin element is linke to the 'jos_users' table using the 'id' column as value.

Its relevant settings are:
Value of 'Please select' option: 0
Label of 'Please select' option: Please Select
Show please select: Yes
List settings - Show in List: Yes
Filters - Filter type: Dropdown

When selecting "Please Select" from the dropdown of the list filter or within advanced search ALL rows in the list are displayed - those with entries in the databasejoin element and those without.

Using fabrikdebug and checking the SQL statement within "list GetData" I observed that if selecting "Please Select" no WHERE clause is created.

Selecting any other entry within the dropdown the filter is working just fine.

Would should I do to give the user the ability to filter for those rows with the value '0' in the databasejoin element?

Chris
 
I'm not sure that's going to be possible. The 'please select' and which ever value you assign to it is considered as 'no data' and thus no filter is applied to it.
I can't think of a way round that using filters except for a prefilter where you could have 'where user NOT EQUALS 0'
 
I understand that currently the filtering for empty entries in databasejoin elements is not possible.

However, their filtering behaviour is not consistent with dropdown elements - which for the frontend user look exactly the same in form view. In list view however dropdown elements have the entry "All" in the filter dropdown to show all datasets. To achieve the same filtering effect for databasejoin elements the user has to select the "Please Select" entry from the filter dropdown.

Moreover, I included a "Please Select" option in all of my dropdown elements (value: "Please Select", label "" (empty)). Therefore in list view the filter dropdown for dropdown elements contains the entries "All", "" (empty) and all dropdown options.

Would it be possible to have the same two top entries ("All", "" (empty)) in the dropdown filter for all databasejoin elements? Selecting the entry "" (empty) would show all rows with the "Please Select" value.

I am aware this would be an addtional feature. Maybe this behaviour could be (de-)activated as an option for databasejoin elements in the backend.

Chris
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top