Create subtable with a circular reference


I am creating an employee directory document within coda.
For each employee I’d like to create a “Emergency contacts” list.

The way I tried to solve this was by creating the directory table and then an emergency contacts table.
The emergency contacts table has a lookup column to the directory table to link the employee name to an emergency contact.
I then tried to add a column in my directory table that filters data from the emergency contacts table to be able to show only emergency contacts for that employee.

When i use the filter formula however, this returns no results.
I tried filter(directory, = emergency but there are no results returned. the emergency structure is to obtain the name from the lookup column “employee”.

Is this an issue due to the circular reference nature of the call?

Any ideas on how to solve this?


Hi @Mauricio_Avalos

If I understand your problem :

  • you have a directory table, with the employees
  • you have an emergency contact with a lookup column to directory table. So that, you can have multiple emergency contact for one employee
  • In your directory table, you want to be able, for each employee, to select one or multiple of its emergency contact, and you dont want to see other emergency contacts.

If yes, here is the configuration of the lookup in directory table, you just want to filter the data from emergency contact matching the current employee :

Then, when coming back to Directory Table, the select list will only contain the filtered emergency contact for each employee

And if you want to display all emergency contact linked to an employee, just use the automatic lookup reference given by coda

Please let me know if I misunderstood your point.


1 Like

hello Quentin,

Thank you for your answer! The last option of using Referenced by is what did the trick. The previous option of filtering the lookup column with the custom filter for some reason returns an empty data set :confused: .
Thank you again for your support!

1 Like

Hello @Mauricio_Avalos

Glad this was helpful !

Have a nice day


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.