Split with js formula

Hi guys,

i have a problem with splitting text in js column. Why it doesn’t split the string? Where is the error in the formula?

P.S: I don’t use the split column because i have to add <li> tag to create a list.

Thanks for your help!
Screenshot 2024-03-12 145841

Because the JavaScript column can not return an array.

What do you mean by adding a <li> tag? Do you mean you split those and add that tag to each element?

In that case, here’s what you need.

return p1.split(",").map(function(el) {
    return "<li>" + el + "</li>";
  }).join("");

3 Likes

Yes! What I wanted :heart_eyes:

1 Like

Bookmarking this for later!

2 Likes

Glad it helped!

1 Like

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