How to dynamically choose table to lookup from?

#1

If I have 3 tables:

table_car
ID, Desc
1, Honda Civic
2, Nissan Rogue

table_house
1,123 Newport Road
2, 457 Glenwood Street

table_owns
ID, person, thing_type, thing
1, Steve, table_car, Honda Civic
2, Victor, table_house, 457 Glenwood Street

How can I choose between the table_car and table_house in table_owns?

I have seen other posts similar but the solutions don’t meet my needs:

Thank you,

-Mark

#2

Suggestion at


would make a solution
thing column’s selection property = Switch(thisRow.Type,"table_car",table_car.Desc,"table_house",table_house.Desc)

This somewhat works, but for every choice added to the list of tables to choose from, you need to modify the selection string in the thing column’s selection property.

Excel uses the indirect function for these kinds of situations.

Anything like that in Coda ?

-Mark