Repeating panel not showing search

Viewed 10

I was trying to make a button to search a database of cars using the plate number in a textbox within dates picked by the user where cars were registered, and show them on a repeating panel, I used a suggested method to make it work but it didnt, I may have typed something incorrectly or missinterpreted the explanation, and I got no data shown in the rows of the repeating panel and no error or warnings so im not sure where did I go wrong.

Im working on anvil using python, but im relatively new to that language.

def button_busq_placayfecha_click(self, **event_args):
    """This method is called when the button is clicked"""

    start_date = self.date_picker_2.date
    end_date = self.date_picker_3.date
    busq_placa = self.search_placa_box
    l = [q.greater_than_or_equal_to(start_date), q.less_than_or_equal_to(end_date)]
    d = {
      'fecha': q.all_of(*l),
      'placa': q.ilike(f'%{txt}%'),
    }
    for row in app_tables.registro.search(
      tables.order_by('fecha'),
        fecha=q.all_of(
            q.greater_than_or_equal_to(start_date),
            q.less_than_or_equal_to(end_date)
        ),
      placa=q.ilike(f'%{busq_placa}%')
    ):
    self.repeating_panel_busqueda_fecha.items = app_tables.registro.search(tables.order_by('fecha'), **d):
      print(row['placa'], row['fecha'])
      row = app_tables.registro.search([...])
      self.repeating_panel_busqueda_fecha.items = row 

self.repeating_panel_busqueda_fecha.items = app_tables.registro.search(tables.order_by('fecha'), **d): gives me a Syntax error: bad input, im not sure why

here is a link to my project

https://anvil.works/build#clone:EYYVCSAV7EIDK6BC=FBKUNUHK3P44N6AIE5AHJ4OS

0 Answers
Related