Is there a way to comment inside a formula as same as you can comment in coding?
@Guilherme_Salles this is a much requested, but non existant feature in Coda.
If you have a very pressing need to leave a note in a formula, there are ways of doing that. eg, you can replace some piece(of, code)
with:
SwitchIf
SwitchIf("Here is my comment about this code",
piece(of, code)
)
WithName
WithName("comment", Here is a more visible comment without quotes,
piece(of, code)
)
IfBlank (only if the value won’t be blank of course)
piece(of, code).IfBlank("Here is my comment about this code")
etc
It’s not pretty, but it may be useful.
Just wanted to add a +1 for the ability to add //comment in a formula for future references/collaboration.
Hi! I’m Arpan, a software engineer at Coda. Thanks for sharing this feedback. The good news is, you can now add comments to formulas! By enclosing parts of your formulas with /*
and */
, that portion will become a comment. To comment out an entire line, prefix the line with //
.
Formula comments can help explain what’s going on in your most complicated formulas and can also be used to save prior versions of formulas you’d like to refer back to.
I am really excited about this feature!
I was just checking in if this was added. Thank you for this!!! Working on something right now and I really needed it.
@Arpan_Laha THIS DESERVE AN OFFICIAL POSTING
There aren’t words to describe how happy I am about this seemingly small QOL improvement. I am SO HAPPY!!! Having to write some ridiculously complex formulas having notes is a must-have! Thank you so much Coda team!
Did the single line comment feature get deprecated / stop working? I have some pretty complicated formulas that have been running for some time and they stopped working recently. The comments now have square brackets around them “[” and when I remove the square brackets the formula starts to work again.
For instance I had “//this code does something” it was replaced in my formula by “//[this code does something]”
Happened to me too with ‘’‘/* comments */’‘’, it also frequently removes all whitespace/line breaks of my meticulously formatted formulas
Same @Martin_Portevin. I have had that happen when clicking the auto format button but never without editing the formula. I started getting notifications of a job failing and when I opened the editor all whitespace, line breaks were gone and my formulas were broken.
Formulas (and buttons) with comments continue to break. Maybe @Arpan_Laha can look into this. At this point I would much rather you delete comments from my code vs break my code.