Table with One-to-Many Relation - Format Data Bindings & Multiple Rows Output

@danbolinson my bad, I should have been a bit more specific.

Issue No.: 1

In the data binding, if I use…

self.item['employees'][0]['last_name']

I’ll get a single name from the linked rows. However, if I use…

self.item['employees'][:]['last_name']

I get this error: list indices must be integers or slices, not str. I’ve used the list() constructor to no avail.

When I use this code…

str([emp['last_name'] for emp in self.item['employees']])[1:-1]

If produces a list like this: ‘last_name1’, ‘last_name2’, etc, etc

Issue No.: 2
I am populating a form dropdown from a table. My code is as follows:

self.input_employee_agency.items = [(x['acronym'], x) for x in anvil.server.call('fetch_record', 'agencies', 'acronym')]

I then have a simple add_row function as follows:

@anvil.server.callable
def add_record(table_name, record_row_dict):
  getattr(app_tables, table_name).add_row(**record_row_dict)

I can’t figure out how to bind the “selected_value” to the linked table column. I would do it manually with a stand alone function but there will be a ton of fields on the form and I wanted to avoid having to program each field in the function. I am receiving an error on submission.