Dear Coda and users,
Here is my wishlist for Santa this year. I want full-size clickable image buttons, PreviousRow(), Function calls, and Editable values. More details here:
Hope to get them granted soon! I was nice this year, promise!
Cheers,
Mikaël Mayer
Oh sorry, didn’t set the doc to be viewable by link.
Buttons are not borderless though. But I’d argue that buttons shouldn’t be borderless. It is important that a button looks like an affordance, not just an inline image.
That’s a great example, thanks for sharing. I cannot duplicate it though to understand how you formatted the first table. It looks like it’s not grouping, since there is no Row/Column fields, what is it?
I’d argue for some cases, a button stops to be a button and becomes a clickable zone.
I mean, if Coda had borderless buttons, we would be able to recreate experiences such as the famous Chips Challenge, but possibly multiplayer.
I know Coda was not designed for these kinds of experiences, but there could be plenty of other experiences where buttons could just become 2D sprites and that would enable prototyping of fun collaborative games.
RowId column formula is thisTable.Sort().Find(thisRow) and PrevRow formula is thisTable.Filter(thisRow.RowId-1=RowId).IfBlank("")
Make sure the RowId formula sorts based on some column that is meaningful to you. There is no “canonical sort order” for a table. This one is sorting based on the Display Column, which is Name
Thanks for this trick, it’s still good to recall it for new readers. I would even add .Last() to get theh last row instead of a singleton list of one previous row - but then it would not work with IfBlank.
I did not know about the IfBlank trick though, it’s nice to have it.
#3 - you can accomplish a similar result with buttons; make the button perform the function and then you can call the button in another formula. This is also great for cleaning up your doc/code.
#4 - you can accomplish this by making the text string that is being displayed a canvas formula or a row reference using the @[DisplayColumnValue] which calls a value in a row. I will create a Variables table and then @RowReference.Value to get the value. An advantage of using a table>canvas formula is that you can modify table values.
Once again, the problem with Find(thisRow, thisTable) is that there is no canonical updating order to a table, so this will just be the visual order. The benefit of the Sort() based method is that you can be assured of the order of the inputs.
Imagine you have an order that’s governed by a table level sort (like Date Descending), but then someone wants to see the data in a different way (Date Ascending) and changes that sort—it would mess your formula up. It’s better to perform the sort in the formula where it’s needed than to on external table states.
If you really wanted to do it in one formula you could with:
But since there is no variable aliasing (yet), this means that you will end up calculating thisTable.Sort().Find(thisRow) twice, which is why I cached it in a row (RowId) in the prior solution
So, in the case that you use PrevRow logic for timetables, you’re probably sorting each row by datetime (I’m guessing). In that case, you really want to be doing that sort in your formula itself, that way to can change the order of the underlying table and not have any problems.
However, if what you want is the visual order of the table, then Find(thisRow, thisTable is the correct approach