join
Learn how to use the join function in Notion formulas.
The join() function takes its first argument and inserts it in between each of its additional arguments. It accepts only string arguments.
1
join(string, string, string)
join() can accept one or more arguments, but needs at least three to perform its intended function.
join() acts much like JavaScript’s Array.prototype.join() method, with all but the first argument acting as the elements inside an array. Note that Notion’s join() function does not use a default separator (e.g. ,), so you’ll always need to define one.

1
join(", ","Luffy","Zoro","Nami","Chopper")
2
// Output: Luffy, Zoro, Nami, Chopper
3
4
// Use "\n" to add line breaks
5
join("\n","Luffy","Zoro","Nami","Chopper")
6
// Output:
7
// Luffy
8
// Zoro
9
// Nami
10
// Chopper

This example database creates a roster for different missions. Each member in the pirate crew can mark whether or not they’re attending, and the Roster formula will output a list of those attending and not attending.
The join() function is used to create line breaks.

join
College Info Geek on Notion

1
// Compressed
2
join("\n", (prop("Luffy") == true) ? "Luffy attending" : "Luffy not attending", (prop("Sanji") == true) ? "Sanji attending" : "Sanji not attending", (prop("Zoro") == true) ? "Zoro attending" : "Zoro not attending", (prop("Chopper") == true) ? "Chopper attending" : "Chopper not attending")
3
4
// Expanded
5
join(
6
"\n",
7
(prop("Luffy") == true) ? "Luffy attending" : "Luffy not attending",
8
(prop("Sanji") == true) ? "Sanji attending" : "Sanji not attending",
9
(prop("Zoro") == true) ? "Zoro attending" : "Zoro not attending",
10
(prop("Chopper") == true) ? "Chopper attending" : "Chopper not attending"
11
)
This join() example inserts "\n" between each string to create line breaks.

For fun, here’s another take on the Roster formula that uses replace and replaceAll - along with some advanced regular expressions - to create a single sentence that includes only the members who are attending (complete with commas):
1
// Compressed
2
replace(replace(replace(replaceAll(join(", ", (prop("Luffy") == true) ? "Luffy" : "", (prop("Sanji") == true) ? "Sanji" : "", (prop("Zoro") == true) ? "Zoro" : "", (prop("Chopper") == true) ? "Chopper" : ""), "(^, | ,)", ""), "[,].quot;, ""), ",(?!.*,)", ", and"), "^([^,]*), and", "$1 and")
3
4
// Expanded
5
replace(
6
replace(
7
replace(
8
replaceAll(
9
join(
10
", ",
11
(prop("Luffy") == true) ? "Luffy" : "",
12
(prop("Sanji") == true) ? "Sanji" : "",
13
(prop("Zoro") == true) ? "Zoro" : "",
14
(prop("Chopper") == true) ? "Chopper" : ""
15
), "(^, | ,)", ""
16
), "[,].quot;, ""
17
), ",(?!.*,)", ", and"
18
), "^([^,]*), and", "$1 and"
19
)

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.
Last modified 21d ago
Copy link
On this page
Example Formulas
Example Database
View and Duplicate Database
“Roster” Property Formula
“Roster Pretty” Property Formula