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!
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!
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("");
Yes! What I wanted
Bookmarking this for later!
Glad it helped!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.