Some formulas in Coda can become complex. As they become more complex they become less readable. I would like to see the ability to format formulas using line breaks, comments and tabs to increase readability. This is particularly important when trying to maintain someone formulas written by others.
Additionally formulas should be created and edited in a much more functional window that allows resizing.
Lastly formulas should be able to be locked or owned by the author so they are not inadvertently changed.
I am trying to generate an email from boilerplate text and fields within a document. I do this by Concatenation it all together and it gets ugly. I don’t seem to be able to use Shift+Enter in this as it immediately breaks the formula when I insert one.
For emails, I’ve used a section of the document for canvas formulas of each piece of the email content. Then I can just pull those into the email button by name instead of creating an extremely long formula.
My formulas are often getting extremely complex. Writing them in a current editor is very painful. Need the features of adult editors, such as auto-indents and disabling line wraps.
Just to add my voice to the choir of wanting more from the formula editor. The current 6 rows and about 66 characters is a too small of an area to manage complex formulas.
My ideal would be to allow support for
Larger area for formula (Envoke with the same short cut as expanding any cell ⌘ + ⇧ + E
Tabs and intendation (switch between one line and indented view - like pretty / ugly format)
Comments with standard // and /* */ syntax that coders are familiar with - this would allow explaining weird formula choices and help when coming back to remember why it was done as such. This would also allow to mark stuff as TODO within formula, if something needs to be fixed/improved later.
As the formula editor is quite small I tend to copy paste the formula to an editor and work on it there, but then I lose the lookup and formula suggestions and end up copy pasting back and forth.
I think the formula’s have a ‘name’ - it’s the column name itself. So the formula name is Table.[Column]. You can further target a specific row by typing @ and then the value in the ‘Display’ column.
This is separate from when you write =formula() on the canvas where that can be a discrete formula which you can reference.
Being able to add a description or comments would be amazing - AND is a more technical than resizing the window (v2)
You’re right in saying that formulas in column technically have a ‘name’ but it’s more the name of the column used when displaying the data and not the formula specifically, and I can’t see a list of formulas I have in columns.
I’ve noticed I tend to make quite a lot of logic inside the column formulas, and it’s hard to keep track of them.
I don’t know what is the best solution, but what I would like is a way to see what formulas I have created in columns. And more obvious way to see which columns have formulas - for example when writing a new formula and referencing the column. Maybe a different icon with columns with formula?
OK so one idea I have used is to have a ‘database’ folder in your doc where you keep the tables with all of the ‘hard coded’ (non-formula) columns, then have another table in a folder called ‘Formulas’ (I use ‘fx’) and in that one I reveal everything. You are right it would be nice if it was baked into the UI. Another thing you can do is slowly drag your cursor along the header row and the columns with formulas with show the f icon.
Just one thing. I wouldn’t rely on those --MsCMk97F etc to stay forever as class name pieces. Those look like autogenerated (versioning?) suffixes that may change at any time.
Rather use *[class^=formula_builder--root] selector that means “class attribute starts with”.
I thought this would be a great hack, however the CSS didn’t work. I did some research and it turns out you need to wrap the class in “double quotes”: [class^="formula_builder--root"]
That’s the CSS. However I have not been able to get any CSS overrides to work in Coda.
I tried:
It doesn’t work live on coda.io, but if I rapidly resize the window I can see the background green color. Not able to get the formula builder to resize.