budibase icon indicating copy to clipboard operation
budibase copied to clipboard

Nested data providers return no results when multiple filters are applied to them.

Open ConorWebb96 opened this issue 1 year ago • 2 comments

Checklist

  • [x] I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker-compose
    • Budibase Version: 2.23.6
    • App Version: 2.23.6

Describe the bug Nested filtered data providers return no results even though their filtering logic seem to be correct. This only happens when more than 1 filter is added to the nested data provider. At the top level data provider no issues seem to occur.

To Reproduce Steps to reproduce the behavior:

  1. Import the attached app below
  2. Go to the home screen
  3. Look at the filters and see that it should return 2 records.
  4. See error

Expected behavior 6 records should be shown whenever referencing the nested data provider.

Screenshots Main filter nothing is set returns all rows within a table. Screenshot 2024-04-17 at 09 51 59 Nested filter 2 filters are set nothing is returned even though every row within main provider is either value a or b. Screenshot 2024-04-17 at 09 52 11

App Export test nested-export-1713343985090.tar.gz

ConorWebb96 avatar Apr 17 '24 08:04 ConorWebb96

The issue with this one is that applying filters to a data provider which is using another data provider as its source, will only do fake in-memory filtering. Looking at the code, right now that code does not fully support the "match any" constraint. It will properly check if any operator passes, but for each operator is does a "match all" on all the values.

i.e. this fails because it is 2 filters using the same "equal" operator.

This is a bug in the code so can be fixed. However I would still discourage this setup because it's doing in-memory filtering rather than server-side filtering.

aptkingston avatar Apr 17 '24 09:04 aptkingston