Make "Disable If" available to all columns, not just buttons

Time and again I find myself longing for this simple and yet powerful feature:

Please let us have “Disable If” for all columns type, not not just buttons.

How it should work:

For every cell in the column where the formula in “Disable if” evaluates to true, the cell becomes uneditable by the user.
The cell retains its value which remains accessible by formulas. The value just cannot be manually edited by users.
When a cell is a disabled in this manner, actions like ModifyRow() should throw an error, just how they do when a cell is set by a formula.

Why we need this (badly):

  • The final draft pdf has been uploaded and approved and it should not be modified by anyone ? now you can!
  • Only the account manager should be able to edit the client basic information but everyone should be able to call notes column in the very same table? now you can!

The world is your oyster !

And who here hasn’t had to do the very silly thing of creating one column A for editing, and one ‘safe’ column B for viewing set equal to A. And then have to create different views for different users.
Surely Coda can do better than this :wink:

Outstanding implementation questions:

  • It’s easy to see what “disable if” should mean text/date/number/select/lookup and file columns. It is less obvious what it would mean for canvas columns. A reasonable interpretation would be that the full canvas inside the column becomes uneditable and any buttons in it disabled, overriding any “disable if” behaviour of those buttons. Another solution is to simply not offer “disable if” option for canvas columns.

  • What should ModifyRows() do when applied to a column where some cells are disabled and others are not is also open for interpretations: Should the modifications still take place in the non-disabled rows or should the whole action fail? I tend to prefer the latter, so that the maker can take responsibility and not have misshapen partial edits.

  • Whether and how to visually indicate disabled cells in the UI without clashing with conditional formatting.

These are important questions, but not insurmountable obstacles.

“There’s a formula for that” is Coda’s unspoken promise and it very much delivers on it in the canvas, conditional formatting, filters, and buttons… let’s build on this amazing idea and go for ‘disable if’ in columns, heck maybe once day we can even have ‘hide if’ for pages!

8 Likes

I was thinking - what if there were a column format (Pack) that never allowed a cell to change unless an external condition existed?

This approach is not without some challenges, specifically that you’d need to define a variety of column types in the Pack. It might be possible, but I agree, this is an ideal feature that seems to parallel an existing paradigm already implemented by the Codans.

1 Like

@Bill_French
I haven’t delved into making packs (I come from a data science background, where Python is king and just hearing the word ‘JavaScript’ sends shivers down my spine). So I don’t really know how convenient such a pack would be.
Indeed, I think this feature will have a very widespread usage and therefore belongs best in ‘core’ Coda.

1 Like

Same here. I’ve been forced to learn a lot of javascript the past 30 years despite being able to outperform almost every javascript app in 1/5th the code. :wink: Off-topic, I have suggested Coda consider supporting Python Packs. Such a move would transform Coda into something akin to Streamlit + a whole lotta’ cool stuff that no one has likely even considered.

Pervasive DisableIf() is a really good suggestion and I may try to experiment with it a bit.

3 Likes

I often lie awake at night dreaming of building ‘Poda’, a shameless Coda clone that just uses Python instead of the Formula language. We already have Python in the browser, so it’s not that farfetched.
I will collect a few more thoughts and reply in the related thread when I have some time.

1 Like