Create button to go to related record?

#1

I’m moving a CMS over from AirTable (and Filemaker) to Coda, and I’m running into really basic things that I can’t find an answer to.

Today, how to create live links between tables.

So I have a table of names with two columns – Contact Name, Company Name.
And a second table, of company names: Company Name, Address

I’m looking at my contacts table, and I’d like to have a button on each row that if I press it, it takes me to the Company page (or view or table, I’m still having trouble getting these straight in my head).

Like a hyperlink, but to another view in the same database, not out on the web.

AirTable populates these automatically when you have related tables.

My second questions is, if I don’t have a company yet for a person – if that field is blank – I’d like to be able to choose a company name from the list of companies in the Company table, and then have it turn into a live button once chosen.

Or does the drop-down selection list, and the button, have to be two separate columns?

And ideally, I’d like this to be an option for multi-choice fields as well.

So for, example, in the Company name, there would be a column “Contacts” and under that a list of all the people at the company. Since there could be several contacts at a company, some of those cells will have several names in them, and I’d like each one to be a separate, live, link button.

Is that possible?

(Again, AirTable does this automatically.)

Thanks!
– Maria

0 Likes

Pop open a row with a button
A novel writing helper ideas? (Split formula?)
#2

Welcome to Coda and Coda Community @Maria_Korolov

Please take a look at this coda doc:

  • Related tables in Coda can be done by setting up Lookup column - you will set up a formula on another table to pull out all related records. Like in above document, Company has a formula like Contacts.Filter(company = thisRow) to get all contacts for a company. While Contacts table has lookup column for Company, that gives you an ability to choose existing companies.
  • In coda when you hover over a record reference, you get a card and you can click on it to see more details - like in above document, when you hover over company, you would be able to see company details right from Contacts table.

Here’s a GIF that shows it in action.

If you are looking for a starter template for CRM - I highly recommend you look for an existing template at https://coda.io/templates

Thank you,
Krunal.

0 Likes

#3

Thanks, the CRM template is the one I’ve started with, since it has so much of the functionality I need.

Thanks for the tip on hovering over the link text – it was not intuitively obvious (to me, at least) that hovering over something would bring up the related data for it, with a button to expand it further at the bottom of the popup window.

And this does give me 90% of what I’m looking for.

I haven’t been able to get it to work in mobile view, though.

What I was specifically asking about, though, was a way to create a button that would let me jump to another section, to a table or view in that section, and to a specific record in that table or view.

Thanks!
– Maria

0 Likes

#4

Also, I’m hoping to eventually share it with people. Click once on a related name doesn’t do anything – clicking twice brings up the formula editing popup window. I’d prefer it if the formula editing was buried just a little bit more, for when I bring other users into this. I’d rather that it wasn’t as easy to mess with things, and that hyperlinks work as expected.

Thanks,
Maria

0 Likes

#5

Okay, if I pull the URL from the view I’m looking at, and save the URL into a variable field, then I can create a button that goes to that URL.

It works, but it asks me if I’m sure I want to go to a link in the same Coda document, then it opens a new tab for that view, then closes the original view.

So there’s a couple of extra, and unnecessary, steps there, but the functionality basically works.

Now all I have to do is generate the URL of a view programmatically… and I see that there’s a way to do that:

Thanks,
Maria

0 Likes

How to create button to go to next row?
#6

Never mind. Just tried it again, and there was no pop up confirmation step, no second tab opening, nothing…

Either you guys fixed this in one second, or I did something wrong the first time.

Okay, so here is what I’m doing to go directly to a row that I want in a table that I want:

I create a new table called, say, “Current contact.” In that table, I just have one row, and it has in it a lookup to the contacts table, and a text field called “hyperlink.”

Then I create a new view of the Contacts table, filtered to show only the Current contact (by pulling in the data from the new Current contact table I just created.)

Then I copy the URL of that view, go back to the Current Contact table, and paste the URL into the Hyperlink field.

Then I go to my main Dashboard view, and create a new button, titled “Go to Current Contact” and have it open the URL that’s in the Hyperlink field of the Current Contact database.

Now I go to my Contacts table, and add a button that says “Set as Current” that updates the “Current Contact” table with this particular contact.

Whew. No need to reconstruct the URL, just requires a new data table (which I’m storing in a “Variables” section in the “Lists & Admin” section of the database.) Since each section can hold several tables, and since it looks like I need a separate table for each global variable I’m handing this way, I can stack them all in this section.

Do I have this right?
Is there an easier and cleaner way to do this?

Thanks!
– Maria

0 Likes

#7

Update: I’ve added a User field to the Current Row table.
Now each user has their own navigation path. And instead of AddRow, I’m using AddorModifyRow to set the current row pointer.

I didn’t expect to have to implement multi-user support in this for a while, not until my next project, but it turns out that I need it because I have a second incognito tab open so that I can work on different areas of the database at once, logged in with a different user (a second Gmail account that I’ve shared the database with).

Now the only issue I have, a minor administrative one, is that the hypergrid to the section with the CurrentRow view is hard-coded in the button formula for adding a new current row entry. I should probably fix that by creating a new table, with the URLs for each type of current row view. That way, I just have to set it in one obvious place if I rearrange the structure of the database, instead of hunting through the formulas for each button.

– Maria

0 Likes