Linked table not showing values

Hello,
I am following: https://anvil.works/learn/tutorials/data-grids/getting-started
and trying to show a record (in a grid) from a table, that has a linked table in this way:
Table Expense linked with table Concept
So I guessed that pulling records from Expense table will automatically get the corresponding description of Concept from Concept table, because that is what you can see on the Tables section.
Instead I get: <LiveObject: anvil.tables.Row>

How can I fix this?
thanks!

Hello,

Just based on the value that is returned as you describe, you would likely need to specify which column from the row object you would like to display.

Generally speaking:

row['the_column_of_interest']

here?
download (1)

In your row detail form for that data grid, drag a label over onto the spot where you would see <LiveObject: anvil.tables.Row>. In that label add a data binding for text that binds it to self.item[‘concept’][‘description’].

This makes assumptions about your field names, obviously replace ‘concept’ with the actual field name for the linking field, and ‘description’ with the actual field name of the description in your Concept table.

There may be better ways of doing this, but this is what I do with linked fields.

3 Likes