I’ve got a table, where each row is a new line of text. I want to output a block of text below the table that puts each row of that table on a new line.
So the following table:
Has a block of text below that automatically generates and looks like:
Hello
My name is Steve
Goodbye
I can’t get it to do this without inserting commas. I’ve been trying something along the lines of:
(=FormulaMap([Table1],concatenate(Column 1,character(10)))
I had the same problem. I found that wrapping my entire formula within Concatenate() did the trick!
So something like:
Concatenate(
the().rest().of.my.formula()
)
gives me a flattened string without commas in Coda.
Then if I want to have linebreaks between each value in my formula, I had to get a bit hackier with the formula, combining FormulaMap with Concatenate
Concatenate(
the().rest().of.my.formula()
## using FormulaMap + Concatenate to add a new line after each element in the list
.FormulaMap(
Concatenate(
CurrentValue.ToText(),
LineBreak()
)
)
)
I just ran into this old thread, but I am sure (new) users run into this type of situation. And about getting rid of the commas, you want to loose the commas that are inserted by Coda, but keep the commas that might be in a single row-field.
The formula is really straightforward:
concatenate(Table.Name.join(" ")) for a solution without linebreaks, or concatenate(Table.Name.join(linebreak()) with a linebreak
It is a habit to wrap things in concatenate to ‘flatten’ coda ‘objects’ to text. Frequently, you are not using just this result by itself, but it’s combined with other data.
In this sample the concatenate() was indeed not necessary. And join() already flattens objects to text too.