Button actions missing

A lot of things can be done by a user who knows his way around. By adding controls certain things can be made available for the less experienced user, although it might not always be obvious how things work.

I have run into a couple of situations that I would like to be available by clicking a button. Certain things might be possible by making (hidden) extra columns, but others seem to be impossible to do.

What I would like to be available as buttons actions (placed on the canvas):
filtering rows in a table (and undoing the filter by hitting the button once more)
sorting a table

Another option that would be very nice is to have a button or switch (on the canvas or in a table column) that goes through a predefined number of settings every time you click on the button. I think this can be done now by using functions, but it is pretty complicated and hard to change. It would be nice if this could be done based on a lookup table (or a list). This might seem a futile difference from what is possible now, but if you want to do these things on a mobile phone (and if you want to do it quick), it is often quicker to hit the button a couple of times instead of getting a popup list. I am thinking about thinks like ā€œyes, noā€, ā€œyes, no, blankā€, ā€œred, blue, green, yellowā€, ā€œdone, blankā€ - even if there are choices when using a select list (the last sample ā€œdone, blankā€ might have many more items in the column, like ā€œplanned, in process, rejectedā€. But also scrolling through a user list by keeping on hitting the button is for small groups a nice feature. If the button label would show the current choice it would a nice finishing touch.

But, I came to write this message because I was trying to make a button on the canvas filter a table, and I couldnā€™t find a (simple) way to do it. Can it be done?

1 Like

Hey @joost_mineur you have a lot of good ideas in this post.

Some of the things you are looking to do can be accomplished with clever solutions. For example:

Filter with a Button

This can be handled by using a helper table that stores the state of a variable. Then, depending on the variableā€™s value you can use an if() statement to show or filter the table. I have created a demo here to show you how it might be accomplished:


Cycle Options with Button

Having a button cycle through options can also be accomplished, although it must use a table. Here is a simple demo for changing a date. I use this in my task tracker to update due dates quickly - you are right it is easier for the user, and has less of a mental load, to click quickly then have to manipulate and consider various controls.

Here is an example using a button in a table and a button on the canvas:


This is what is great about Coda, it can do more than you imagine!

3 Likes

@joost_mineur, great questions you are not alone having these experiences. :thinking:

Thanks @Johg_Ananda, as always very valuable input :handshake: :diamond_shape_with_a_dot_inside:

My personal point of view:

As Coda is developing and especially in the last months, delivering many new features, we tend to forget how it started. (bottom up).

As we have seen for example how the filters have become more (basic) user friendly and how ā€œmodulesā€ with common used tools (like voting) have been made at easy available, I expect the same to happen in the future with your mentioned areas.

Finally the idea behind Coda is being ā€œNo Codeā€ and on itā€™s way to come there, we can influence itā€™s development, learn ourselves and enjoy the opportunity to create something tailored to our needs, not available in the market.

From the ā€œMakers generationā€ :construction: :building_construction: :construction:

1 Like

Thank you @Johg_Ananda and @Jean_Pierre_Traets for your supportive answers.

I will play over the weekend with the solutions offered. I am very much aware of the current state of development of coda and I hope that my questions and remark help the developers to see and understand what we, the users, run into and that it help them to set priorities.

In general I have very mixed feelings about no-code environments, but Coda makes a lot of things very easy. I am still finding my way around and I am a bit worried about making my pages safe but/and usable at the same time, so I need to do some experimenting with the locking that I can utilize after upgrading my account. But development time is indeed just a fraction of the time compared to most other environments. As for my own use, I am already very comfortable with the daily usability, for my users it takes a bit more tuning.

Let me finish this message with two separate remarks:

  1. for me, it would be nice if a manual ā€˜with everythingā€™ would be made available, so you can read from one end to another (with updates from or links to the community supplied suggestions). I feel that between the separate docs and the community a lot of information is available, but a bit hard to find.
  2. the community and the coda response has been very quick and very supportive and it has really helped me. The lack of the famous RTFM answers is refreshing!! Good job everyone and thank you.

@joost_mineur you are very welcome! Hereā€™s a topic showing you how to sort using a canvas control (something you asked for in your original post that I didnā€™t cover):

1 Like

The samples in playground really helped. Among other things I looked at the sorts based on extra tables (and coumns). Some solutions are not very intuitive, like

thisTable.Sort([Sort Direction],thisTable.[Sort Option]).Find(thisRow)

I am kind of wondering how I would have come up with a solution like that myself. There is some room for extra documentation and perhaps some other functions or solutions.

That said, the examples inspired me to do some more playing around and what I was trying to achieve (filter out ONE specific item) by using a button is possible without any additional tables or extra columns. I ended up using a check field instead of a button:

if(CheckBoxShowOranges,thisRow.Fruits!=ā€œOrangesā€,true)

checking the checkbox filters ā€œOrangesā€ from the list. That is just as effective as using a button. I think using a button should be possible too, but there are a few complications: a button must always have an action (and for me there is no other action than chaning the label of the button), so you must define a fake or useless action (and I donā€™t really like that because I donā€™t like tricking my programs). And I have not found a way to read the label of a button with code (can it be done, or should that go on the wishlist?). Since it is pretty easy to change the label of a button, reading the label would allow for a filter to set (or un-set).

Thank you all for the samples and sugggestions. For a codeless environment certain things are a bit tricky, but certainly can be done.

1 Like

Youā€™ve got all the right help here. Like youā€™ve mentioned, buttons donā€™t affect canvas controls, so that makes things a little trickier. You can however setup a 1 row table that has a checkbox column and a button column. You can also add more columns as needed and write your filters based on this tables row.

We have notes on a lot of this and want to continue to make things easer to use, but the workarounds here are a good bet to get you going at the current moment.

Yes, I am happy with the help, as this is real help indeed. I have to do some testing with locking, but the one thing I donā€™t like about the one row tables is that is seems to be pretty easy for these tables to become 2 or more row tables with the risk of users not understanding why the 2nd and following rows donā€™t do anything. Maybe Iā€™m wrong on this, Iā€™ll find out.

This is what is great about Coda, it can do more than you imagine!

I agree with that one.
Thanks for pointing me to the sample - more samples to get me deeper into Coda.

Greetings,
Joost

1 Like