Remove commas when copying table to clipboard using formula


I have a button where On Click is set to Copy to clipboard. For Content`, I am using this formula:

[New & Noteworthy Updates]
      Hyperlink([Directory URL],[App Name]),
      LineBreak() +
      Hyperlink([Partner URL], [App Name]),
      [Change (AI Output)] +
      LineBreak() +
      LineBreak() +

For the most part, this works well. The issue I’m running into is when I paste the content, it’s adding additional commas. For the life of me, I can’t figure out how to update the formula to not include those extra commas. If I replace all commas in the formula with +, then the hyperlinks don’t work. I’d appreciate any advice!

Also, if possible, I’d like the formula to bold the first App Name.

I’d really appreciate any advice!

Screen Shot 2023-10-31 at 4.40.40 PM

Can you send the doc link???

Hi @Scott_Collier-Weir :wave:

I’ve recreated it here for you. Thank you!

Ok so here are your issues.

First thing to understand is the RETURN value type of a formula. Your data in Coda has different types. Some examples are:

  • Text
  • Number
  • Row Value
  • Date
  • Boolean (true/false)

And most importantly:

  • Lists

Notice here, I did a simple forEach() Loop on your table, and it returns the values in that table with a comma between each value because forEach() Loops ALWAYS return LISTS

You can also confirm that the return type of a forEach() loop is a list here. The chip-icon on actual chip itself has a little shadow letting you know that the value is a list.

Here is full documentation on Coda formula chips and value types - I recommend giving it a look

So that is the source of your rouge commas - commas are an indication of a list. So how do we get rid of them?

Well one really good way to turn lists into plain text value is to JOIN lists via a certain character. The Join() formula in Coda was made just for this!

Notice here with this simple forEach() list, I used Join(lineBreak()) which allowed me get ride of my commas, and return my values stacked!

The solve to your specific problem

To be honest, Im not sure exactly what you’re looking for, but hopefully using the principles above you can get the formula you need!

Here is a small formula I wrote to mimic something similar to your output

Some more formula help

Heres some more formula assistance with the formulas you might need to use from the Coda School!

1 Like

@Scott_Collier-Weir I cannot thank you enough for your generous response. This is truly above and beyond. Your solution is perfect, and I really appreciate you sharing so many resources so I can continue to learn. I am going to deep dive into as much of this as I can. I’d love to absorb as much as possible. If there’s anyway I can upvote you, please let me know. I am truly in awe.

1 Like

Haha thanks for the kind words!

Just hoping to help educate as many people as I possibly can on Coda!

If you want to follow along Im always sharing free resources and tips on the following platforms:

1 Like

You’re an absolute legend. I’ll be following your channels! Thank you for sharing. And I hope the Coda admins show you the gratitude you deserve.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.