Turn comma-separated items into a list of unique values


I’m trying to take a simple comma-separated list and convert it into unique values so that I can parse them in other tables.

For example: I have the text “dog, cat, fish” in a cell. Coda sees this as one value of “dog, cat, fish”.

When I try to convert above text into a list - either using List() or ListCombine() - Coda returns [(dog, cat, fish)] instead of [(dog),(cat),(fish)]. Unique() doesn’t do what I need it to here either, because it sees only one value instead of three.

Context: I am trying to format a column as a multi-select list - I want to be able to select any/all of “dog”, “cat”, or “fish”, but I cannot get them to appear as unique values - they always appear as “dog, cat, fish” instead. See below - Nth(1) should return “dog”, but instead it returns “dog, cat, fish”.


How do I do this? Sorry if the formatting in my question is weird, I’m not a natural programmer.

1 Like


The first step is to convert your comma separated list into a list object. Split() returns a list of items.
NOTE: column [list bullets] is actually =split.BulletedList()

The next step is to get that list into a multi-select dropdown. There are a few ways to do this. Since I don’t know exactly what your end use is, I can’t suggest one way over another.

However, you caused me to figure out something that I will now use in one of my own workflows, so thanks!! :muscle: (see below)


Yes! That does it! Thank you - Split() is exactly what I needed