Displaying DB linked table columns in Data grids

Hello,

If you want to show all transactions for all customers you could do a few things:

  • For each customer, you could “string join” your transaction ids together by writing some code on the server. Return your processed list of dictionaries (rows) to the client and set your data binding accordingly. It might look something like this:

    [{'customer_name': 'jim', 'transaction_ids': '001, 002'},
    {'customer_name': 'john', 'transaction_ids': '001, 002, 003'}]
    
  • You could nest one repeating panel in another allowing you to display the repeating customers as well as the repeating transactions (see the data grid tutorial for an example of crazy cool nesting)

  • You could have the UI choose one customer at a time and therefore you would just set your data bindings to that customer’s transaction IDs. Here’s an example of that:

    com-video-to-gif%20(25)

    clone:
    Anvil | Login

Much depends on your app’s structure and specific needs. Please feel free to clarify further with code and a small example app if this suggestion doesn’t help.

1 Like