How do I Automatically fill in Lookup field based off other values

Hello, thank you for your help.

Here’s the scenario

  • I have emails being imported into a table.
  • I can press a button and import a row into a new table for ‘tasks’.
  • The ‘tasks’ table has a lookup column for the client I’m performing the task for.
  • That lookup column for ‘clients’ links back to a third table that contains all my contacts.

I would like to be able to add an action to the button that sends the ‘email’ row to the ‘task’ row to automatically fill in the lookup field for ‘client’ based off of an association between the ‘client’ and ‘email’ table (like their email address or from name).

How can this be done?

Hey - thanks for posting your question here!

If I’m understanding correctly, you’re describing a very common use-case for Coda and lookups. Once you learn how to do this, you’ll probably be doing it throughout your docs :slight_smile:

Probably the easiest option is to add a formula to your ‘Client’ lookup column in your Task table. This formula will likely look something like: Client.Filter(Email.Contains(thisRow.Email))

This help article has an example that may be helpful (under “Summarizing table data with lookups and thisRow”), so feel free to check that out.

Let me know if this doesn’t work for you or if you have more questions!

1 Like