What I’m trying to do:
I have a column called productModel in a table that is linked to another table called products that has two columns called product_number and product_name. When I call this table in a repeating panel it displays
<LiveObject: anvil.tables.Row>
instead of the data
I guess essentially what I want is two “inner columns” inside the productModel column for product_number and product_name from the products table.
After setting up the repeating panel, you need to handle each row in the repeating panel’s item template. You can then have the connected table be handled with a repeating panel and another item template within the first repeating panel. You can see what I mean with this clone link:
Super helpful thanks!
The only issue I’m having now is that in the ItemTemplate2 form, when I set the label text to be column name such as: self.product_name.text = self.item["product_name"]
It’s returning the error that a list index cannot be a string
I can of course input the index of the column as
Whatever you’re passing into that second template doesn’t look like a linked row to Anvil. If you show how you’re populating that second repeating panel, and the structure of your data tables, that would help narrow it down.
The first line will tell you what self.item is.
The second line will show its content if it is a dict (or something compatible to a dict, like a row object), or crash if it is not.