How can I take every cell from a column in a table, and output it to text, without commas inserted

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:
Annotation%202019-08-23%20155701

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)))

1 Like

@Steve_Simon

Read through this thread (all the way to the end): New Line in FormulaMap

1 Like

Could you be a bit more specific about what solution you’re pointing to? All the solutions still seem to have commas inserted.

Is it possible to do what I’m asking?

@Steve_Simon

I suppose I could have been more clear about that! :crazy_face:

I think it’s still not possible to do what you’re asking. That forum thread covers the issues involved, and mentions some workarounds.

@Steve_Simon maybe I am simplyfying this or not getting what are you looking for but would this work?

ListCombine([Table 1].[Column 1]).RegexReplace(",",Character(10) )

It won’t work if you have commas in the text in your rows .

Yeah, unfortunately I do have commas in the text in the rows… thanks for the potential solution though!

FormulaMap([Table 2].[Column 1], List(CurrentValue, “88”)).ListCombine().RegexReplace(", 88,",Character(10) ).RegexReplace(", 88","" )

First insert a random identifier then replace it :slight_smile:

I am sure there is a nicer way to do this but I am on my first cup of coffee…

1 Like

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()
            )
        )

)
2 Likes