Checkboxes: Dependent canvas checkboxes and improved checkbox table column type options

I think checkboxes can use some improvements.

Suggestion 1: “disable if option” for a checkbox, make ability to change the state of the checkbox dependent on the state of another (one or many) checkboxes.

For example, if one canvas checkbox is checked (set to True()), you can’t click on the other one (like “disable if” option for buttons). Same “disable if” option can be used in checkbox column type options (don’t allow to change the value of checkbox if some condition is met).

Suggestion 2: An option to uncheck a checkbox (set it to False()), if dependent checkbox is being set from False() to True() (or some other criteria is met). Would be useful for canvas checkboxes AND checkbox column type in a table.

Suggestion 3: make canvas checkboxes programmable (give an option to set a function for a checkbox).

Real document example where it would be useful:

I’d like to use checkboxes to control filtering of the table.

I created two canvas checkboxes and use their values for two table filters.
One checkbox is to show only rows from the table Ingredients with value True() in the column “Using now”, another to show only rows with value False().

I can’t disable an option to click on one of these checkboxes if another one is set to True().
This would be possible with Suggestion 1.

And I can’t change the value of one of the checkboxes depending on the state of another (for example, to set the first checkbox to False() if the second one changes it’s value from False() to True()).
This would be possible with Suggestion 2.

I know I can use multiple select to control a filter, but multiple selects are almost unusable on mobile (especially if the list is long) and checkboxes are much easier to understand and use.

1 Like

Hi @Andrei_Kharlanov,
I second what you say, in terms of adding some conditional default/disabled values.

If I correctly got your point, maybe you can find a workaround through a tactical table.
Please, have a look at the below example and tell me if this is something that would work for you:

Cheers

Edit
Point me in the right direction in case I misunderstood your need (I’m not sure… :thinking:)

4 Likes

Dear @Federico_Stefanato,

This work around came to me as a gift from heaven :innocent:, as I was trying to find a solution for a similar problem :zap::zap::zap:

Thanks a lot :champagne::clinking_glasses::champagne:

2 Likes

Yeah! :man_dancing:t2:

1 Like

@Federico_Stefanato, thank you!

Very cool workaround, and it does exactly what I wanted to do.

Would be cool if Coda team can implement it as a native feature of checkboxes, because wide control table does not feel native on mobile at all (like so many other features of Coda).

I played with your example and out of curiosity extended it to use more than one criteria for the filter.

Here is the same table with more filtering options (dropdown for the “Color” is not working on mobile):

Dear @Andrei_Kharlanov,

The color is not a checkbox item and therefore the functionality is not working.
I assume ( will have to try and play around) when making a table with the optional colors in a checkbox format, it should start working.

F.Y.I.:
As you doc has a long name, the button to open the doc is not available anymore in the embedded doc.
I posted a bug report:

1 Like

It shouldn’t be a problem (and I works on desktop), code for the color filter is taking into account that it’s not a checkbox:

If(RowControl.[Filter By], 
thisRow.Color=RowControl.Color, 
thisRow)

I checked now, actually, it’s even working in mobile app, you just can’t choose the value from the dropdown when you open the document — you need to tap on it, the row from control table will open and there you can choose the value for “Color” from the dropdown.

But dropdown UI is terrible on mobile, I see only one value at a time, not the whole list, that’s why I assumed first time it doesn’t work on mobile

See the screenshot:

(I’ll post my suggestion to the Suggestion box for dropdowns on mobile soon, because they really are almost unusable on mobile. Especially when the list is long).

On my side looks OK:

I think @Jean_Pierre_Traets was talking about the embed on the Community :wink: .

I don’t see the “Open in Coda” either :blush: .

Dear @Andrei_Kharlanov,

Yeah, this is what I see in this community:

Not sure if it’s a Coda related problem or from this platform

Dear @Andrei_Kharlanov,

You are right and I should have checked before posting my assumption, sorry :handshake:

For sure you are right about the necessary mobile experience improvements.
I tried on my mobile device (on the embedded doc) and it’s not obvious for sure, but when you touch on the color, the menu with the other options becomes available.

Yeah, me too :crazy_face:

@Andrei_Kharlanov : Ah :sweat_smile: :rofl: !

You probably have a bigger screen than we do :yum: !

Or it might be because it’s your doc… As you have access to the dropdown menu next the title and we don’t. So for us, the title appears in full length :blush: .