List results in Line Breaks and not Comma Separated

Greetings Tada Folks-

Does anyone have a work around for what appears to be a bug for a Details Component > 1:Many connected value to show a result with comma separations. Currently, even with the “Comma” selected the result is a line break display.

Thanks,
Adam

Hi Adam, @SafetyUniversity

You can make a rollup field and then concatenate.
I did this for roles of a user.

Not sure this translates to your case, but it might give some pointers…

Thanks @Peter for the idea. Unfortunately a rollup won’t work since the field is in the same table and you can use a rollup to concat another field in said table.

Cheers mate,
Adam

Greetings all-

I was able to synthesize a javascript posting (Display Addresses in a Single Line in Table Components)

Works like a charm. (JS HAS BEEN UPDATED AS OF 9/12/24)

TB.render('component_XX', function(data) {
    // Select all elements with the class 'breaks'
    var linebreaks = document.querySelectorAll(".breaks");
    linebreaks.forEach(function(item) {
        var content = item.innerHTML;
        // Replace <br> tags with ", " (comma and space)
        item.innerHTML = content.replace(/<br\s*\/?>/g, ", ");
    });
});

Replace the component number with your own specific one and use “breaks” in the CSS class (or change it to something more suiting for your needs).

Hope this helps,
Adam

1 Like