Relating two databases with buttons

Hi everyone, hoping to get some help on how to use buttons to relate two databases together.

Table 1 “Contacts” | Table 2 “Invoices”
Table 1 contains a list of contacts with their information. Table 2 contains invoices received from them. Table 2 does this by pulling the names as a look up from Table 1.

I’d like to go into Table 1 “contacts”, and click on a button which takes me directly to the invoices from that person in table 2 “invoices”.

From what I’ve seen it did not seem possible to do it with 1 button in table 1 only. So far I have managed to get the buttons in table 2 invoices working with a hyperlink that will open a full page of what I need. Works perfectly.

The issue is when I try to get a “Push button” to work in table 1. I need some way to filter it to the name, because right now it tries to open all buttons in table 2.

I’ve already managed to get the settings so that the buttons only work if there is in fact an invoice available by using the disable if function for the first button in the invoice table 2.

But I cannot seem to find a way to filter button 2 so that it only triggers the buttons for the rows that have the same name in both tables. I think an added difficulty here may be that I used a roll-up for these names.

Any advice?

Hope this was a bit clear.

Thanks

Not sure you need complicated button behaviors, you can add a column to Contacts that collects all the references from Invoices:

then create a detail View of Contacts and edit the layout to show the list of Invoices as a table:

image

Not sure how you are doing a lookup

Coda has more powerful native functions than lookup by name.

In your invoices table, you can create a column with “Contacts” which you can select as a dropdown in any invoice.

In this way you can build this relationship “A contact can have many invoices”