I’m having trouble integrating colors into text cells that are generated programmatically. The way Coda displays different options in Select Lists is truly elegant, and I’d love to replicate that style in programmatically generated cells.
Here’s an example of what I’d like to achieve (a mock-up of a Select List):
I didn’t try to understand your data model, but you can probably do something similar to what I did in this little demo I built:
Instead of generating the 3 lines on a cell, just use similar logic to generate the display field of the items on a separate table, link them to your original item and add some conditional format.
If using display columns is not an option, I’m not aware of any way to get color-coded chips like you asked for in your original post.
Nevertheless you can achieve something similar using format() and a helper table with the color formats you want. I updated the previous doc with an extra column showing this approach.
In your formula, after the filter you should iterate through each item, and apply either the green background or gray background format to each text, depending on whatever logic you use to determine that.
Thank you Pablo. It is a great idea. It works.
I am just curious, how can you use that kind of syntax in Coda, the editor would not let me write that :
Instead, I had to formulate it like that :
My problem is solved, thank you. Hope it will serve to lots of people.