List & ListCombine
Share
Explore

icon picker
List & ListCombine

Formulas: List() and ListCombine()
Category: Lists (Arrays)
numbered-list.svg
List()
Turns a set of values into a list
or stated otherwise...
Hey Coda, can you turn all of these values I provided into a list?

microsoft-mixer.svg
ListCombine()
Merges different lists into a single list
put a bit simpler...
Hey Coda, here’s a set of lists. Can you combine them and turn them into a new, single list?
Both List() and ListCombine() take the same, single parameter. That parameter is called Value, but it is actually a repeating parameter. Specifically this means that you can input as many or as few values as you would like to create new lists.

exposure-value (1).svg
Value

List/ListCombine(Value. . .)

The string of text, numbers, etc. that you want to combine into a list, with each item separated by a comma.


List()

List() allows you to manually create a list out of values. Take this GIF for example:
And here’s the list:
123dog

Screen Cast 2022-08-18 at 12.01.31 PM.gif

ListCombine()

ListCombine() is a bit more useful in Coda than List() alone, so we will spend a little more time on this one. Watch how list combine takes these two lists below and merges them into a single list.

See the lists separate
combined

Combined List:
123dog578cat

But why is this helpful?

Let’s say you had a table called “Projects” and you wanted your team to sign-up to be involved in a project.
Normally, you might think this would be a regular ModifyRows() action inside a button that sets the column value to user() (like in the blue button below). But it actually doesn't! It will override every value in that column with the current user
Try the blue button that looks like this and notice what it does:
Sign Up
Why doesn’t the blue button work?
The blue button below, which is set up like this screenshot, will actually just over-ride every single value in the Assignees column with the current user regardless of what is already in there. It simply is saying:
“Hey Coda, change the Assignees column to my own User chip”
This will obviously only work correctly the first time someone presses it, but anytime after that it will clear the whole cell and any previous individuals who signed up
image.png
Now try the white button that looks like this below →
Sign Up
Why does the white button work?
What the white button is doing is a ListCombine() - It is essentially saying:
Hey Coda, can you take whatever values are currently in the Assignees column, then take my personal user value, and combine them into one NEW list? Then set that NEW list as the value for the column.”

1
2
3
Project
Sign Up
Broken Sign-up
Assignees
Annual Marketing Plan
Sign Up
Sign Up
Scott Weir
ML
Product Launch
Sign Up
Sign Up
Scott Weir
Stuart Weir
Project: Spruce up the Emails
Sign Up
Sign Up
Scott Weir
ML
There are no rows in this table



Done
Use list combine to make a button reset a control value and view every row available
Done
Done

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.