Create link to row in specific view

With the function openRow() you are able to specify the view in which the link opens. While this function can be used within a button, it doesn’t recognize it when used in the canvas (and instead displays ⚡️ Action).

While the button is a viable option, it has a few drawbacks. Specifically, the formatting—it looks like a button—and the number of options may overwhelm users. Not to mention I’ll end up with an endless number of objects (button 1, button 2, button 3…) as users won’t be disciplined enough to name them.

Is there another method to achieve that ability? ObjectLink() doesn’t allow one to specify where the user’s attention is diverted and that is my primary goal. I have a master table and another view that displays only the rows that have received department approval. Although the master table would display as having no values to most users (through the use of a filter), I want to keep them in the habit of going to the approved documents view to avoid confusion.

Hi there @Nate_Eikelberg!

From what I understand, you’d like to have a button that opens up a specific row in a modal view for example. The reason the OpenRow() function doesn’t work when used in the canvas is because, by default, it references the row it’s executed in. So if it’s in the canvas, it’s missing the “row” parameter because it’s not tied to any row directly.

A way I’ve approached this before is using Concatenate(), Join() or Format() formulas to generate a URL to a specific row based on that row’s object link and then just appending the “Modal” parameter at the end of the URL. This is based on knowing the structure of the URL parameters that Coda uses when it’s opening a row while you’re working on the doc.

Here’s a screenshot of how it’d look like:

After having generated these URLs, you could use them as reference for the button action of OpenWindow(), either by directly adding the static URL inside of the parenthesis or referencing to that URL field in a specific row.

Now on the topic on how to choose the Layout of the modal or full screen window you’d like to open… that’s managed directly by the layout that you’ve selected for the table you’re referencing. Unfortunately you can’t pass the name of the layout as a parameter on the URL directly at this time.

Btw… this approach also works if you want to highlight a specific row in a table of a given page. It’s not only used for opening a row in modal or fullscreen view. The way to do so is just to open the ObjectLink() URL without appending the “&view=modal” at the end of the URL.

Please let me know if this approach makes sense for you and solves your use case! Always happy to help

Hi @Steven_Hurtado , thanks for taking the time to respond. The ideal scenario for my use case would be to not use a button but instead be able to do something like this:

OpenRow([INVC 001.00],[Approved Policies and Procedures]) (where INVC 001.00 is the document number—display column—and Approved Policies and Procedures is the view of the main DB table I want to direct the user to)

It isn’t so much whether it’s a modal view or not, but instead which table the user is directed to when the link is clicked. The main table stores all of the documents regardless of status and I want to limit users being directed there as much as possible.

As far as I’m aware there isn’t a native way to achieve what I’m wanting, however was hoping someone knew of a workaround.

1 Like

HI Nate,

You can use the parameters in openRow() to direct people to a layout of a view, as below.
It will open (parameter 1) the last row that was created in table TodoList, using the (parameter2) Layout of View Meetings of the table Todo List.

But I am not aware of a way to get rid of the button.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.