Linked rows question

I guess anvil tables work a bit differently
here’s a related discussion Data Tables Join
There are others if you search for joins in the forum

Assuming you have a method somewhere that creates an employee row


@anvil.server.callable
def create_employee(employee_data, salary_data):
    id = gen_id()
    salary_row = app_tables.salaries.add_row(id=id, **salary_data)
    employee_row = app_tables.employees.add_row(id=id, salary=salary, **employee_data)
    return employee_row

But maybe you want to link them after they’ve been created


@anvil.server.callable
def link_by_id(id):
    employee_row = app_tables.employees.get(id=id)
    salary_row = app_tables.employees.get(id=id)
    employee_row["salary"] = salary_row

Hope that helps