budibase icon indicating copy to clipboard operation
budibase copied to clipboard

Repeater block filtering does not appear to function properly when a filter is bound to Current User.email

Open cerealcoder opened this issue 5 months ago • 2 comments

Hosting

  • Cloud
    • Tenant ID: stardustadmin.budibase.app -->

Describe the bug My goal is to use a filter in a repeater block to select rows from a column for which the current user is "authorized". In this case, authorization is achieved by adding the current user's email address to a column in a data table. The filter works correctly when, at design time, I specify a literal value. But when I change the literal value to a binding (the current user's email address), the filter returns an empty data set.

To Reproduce

  1. Create a data table that contains a column of type Multi user
  2. Populate a row in the data table with the current user's email address (using the value provided by the cloud IDE)
  3. In a screen, create a data provider that references the table
  4. In the data provider, create a repeater block
  5. In the repeater block, enable filtering
  6. Add a filter line item such that (a) the column references the Multi user column, (b) the option is Contains, (c) the option is Binding, and (d) the value is {{ Current User.email }}
  7. Preview the screen
  8. Verify that the repeater block renders the Empty text string (this is not expected)
  9. Modify the filter such that (a) the option is Value, and (b) the value is a literal string that matches the current user's email address (via a picker provided by the cloud IDE)
  10. Preview the screen
  11. Verify the repeater block renders the appropriate content (this is expected, but using a literal value is not acceptable)

Expected behavior The filter should be able to utilize Current user.email instead of a literal value.

App Export stardustadmin-export-1724966474225.tar.gz

  • See data table Customers
  • See screen companies
  • See the filter in repeater block CustomerRepeaterBlock

Desktop (please complete the following information):

  • OS: macOS Monterey V12.4
  • Browser: Chrome
  • Version: 127.0.6533.100 (Official Build) (x86_64)

cerealcoder avatar Aug 29 '24 21:08 cerealcoder