Access referenced rows from other side of the relation

Hi there !

My problem is the following: Let’s imagine we have a table named ‘Contacts’ with columns representing a “name” and an “address”, and a table named ‘Calls’, with a column referencing a “contact”, and a “datetime” for the call. We have a 1-N relation between “Calls” and “Contacts”

What I want is to have a list of calls from my contact row, basically be able to access the N-1 relationship, either as a column or in a formula (Airtable create this field automatically for reference)

To do that, would I be forced to manually create and update a column in my Contacts page named “call(s)”, with basically, the opposite relationship or is there a way to access the referenced row that I am not aware of ?

Thanks a lot !

This is a common question. It’s not difficult to accomplish if you know what to do, but it’s not easy for beginners to find that out, and it’s not easy for Grist to make it more obvious. So if you’re willing to participate, a little experiment might help us.

Create a new formula column in the Contacts table and type in ‘Calls’ or whatever the name of the other table is, then look at the options in the autocomplete. Does that help?

1 Like

Aaaaaaah I see, it did not occurred to me that it could simply be a call to the table object, but it does make a lot of sense.
I wasn’t able to find an answer online and searched for a good hour on the documentation, community forum and github, but my search skills might be getting a bit dull !

For everyone seeing this post afterwards, the answer is Calls.lookupRecords(contact=$id)

Thanks a lot Alex !