Use buttons to close windows

Hello, I have a UX request relating to the window displayed when a row is opened (modal window?).

I appreciate that as info is added to the fields in the window, that data is automatically added and saved to the table. However, my end-users, who are probably more used to the online form experience, might be looking for a “Save”, or “Submit”, or something like that.

I can fake this feature to some degree. A save button could tick a “Saved” checkbox and then disable the button; and I could get any new row changes to untick the box and enable the save button.

Is there a way to make a button close the window though? And if not, could this be added somehow?

It’s not my first choice to add features that don’t really provide a function, but a more familiar UX will help with roll-out. Some of my users will be new to tools such a this so removing the anxiety from simple things like closing a window will really help them engage with the product.

Thank you!

3 Likes

Failing that, perhaps the existing close “x” and “< back” buttons could stand out a little more. Maybe a little more contrast to aid accessibility?

3 Likes

+1

One way to achieve this would be to make modal-wide elements (edit layout, menu, close “x”, breadcrumbs, etc) sticky at the top of the modal.

1 Like

Hi there

Would this help?

Interesting, will give that a try. Thanks for that :+1:

I just created this post:

Addressing a similar issue.

Just wanted to add in this thread, since I happened upon it researching this issue, that although it’s great to have the workaround, things like using a URL parameter as @Al_Chen_Coda you suggest are not that easy for non-developers. I agree the solution though, which ultimately does put a “button to close the details view” in play, solves the problem.

Thought I’d mention this as something for the Product Folks as they work through how to make some of this basic functionality easier to implement if you’re not a developer!

Thanks guys as always!

2 Likes

I am pretty sure this is still a wish for many of us: can we get an action to close the modal. It would be a nice last action for a button after some other actions have been taken care of.

Posting this reaction to bump this suggetion.

1 Like

Hello, just an update. I tried adding a button column to my table. The button action is ‘opens hyperlink’ and the URL uses the formula ‘objectlink(thisrow)’.

So far so good! With the button added to the expanded modal view of the row, clicking it closes the modal and takes you to the row, which is fine if you’re peaking in for more details or using something like an add row button that opens row for editing for the table in front of you. However, if your add row button is adding to a table on another page, this would take you to that row on that page.

This works for my use case but a close modal feature would be more simple.

works to close the modal… BUT if you are using this on another view of the table then it takes you to the master table instead of the page you were just one.

@Irfan_Khan Agreed - seems to be a limited workaround with objectlink(thisRow).

A function CloseModal( ) would be a lot easier. Pretty please @Coda :heart:

10 Likes

Anyone had any luck with object link( User() ) ?
For me, this used within a button hyperlink() seems to just close the modal and leaves you on the same page. It doesn’t take me away from whatever table view I might be on at the time, but I’m still testing.

2 Likes

@Adam_Clewley I tried both objectlink(User()) and objectLink(thisrow) in a hyperlink button and both accomplished the intended result of closing the modal. I agree Coda needs an easy button type for this!

I did get the objectlink workaround to function. Just to be clear, you need both OpenWindow and ObjectLink (at least I did). Here is the code I used to create a popup that sets (filter) the data source for a workflow management app across multiple pages and then closes itself:

RunActions(
 SetControlValue(NAV_ProjID, sel_ProjID),
 OpenWindow(ObjectLink(User()))
)

This function worked for me until just recently. Anyone else run into this problem - where it used to work and no longer does?

I am not sure @Darren_Tran , what fails exactly, but I would go for:

thisTable.Objectlink().Openwindow()

this one will work, cheers, christiaan

1 Like

Thanks for the response, Christiaan.

What I have setup is a popup window from a table for people to work on. From there, there is a button with the OpenWindow(ObjectLink(User())) function that people would press. It ‘closes’ the popup by going directly back to the row/table they were at without opening a new window. It used to be seamless. I am beta testing the popup windows being able to be on the “right side” and I feel like this issue coincides with the beta testing.

OpenWindow(ObjectLink(User()))

@Darren_Tran , do you mind trying this syntax: User().ObjectLink().OpenWindow() and share your experience with us?

cheers, christiaan

Unfortunately I get the same results.

When I press the button, a Coda notifications pops up saying “Hyperlink Open” but the popup is still there.

I never came across an issue like this, one option is maybe the creation of a filter like below in which we move back to the table DB Clients and we filter on the name of the client

[DB Clients].Filter(Name.Contains(thisRow.clients))
.OpenRow([DB Clients],viewOrLayout: "Fullscreen"

May your issue be related to the Beta testing, I am sure the Coda team will have a look.

Cheers, Christiaan