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, directory.name = emergency contacts.employee.name) but there are no results returned. the emergency contacts.employee.name structure is to obtain the name from the lookup column “employee”.
Is this an issue due to the circular reference nature of the call?
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 :
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 .
Thank you again for your support!