function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vance Kessler 23Vance Kessler 23 

Need to strip out character in an aura bound field

I have a column that is a multi-select picklist. I would like to translate the semi-colons returned from SOQL to spaces before I display this value. How would I replace all the ';' with spaces?

Here is the part of my page that displays this column
        <aura:iteration items="{!v.territories}" var="t">
            <tr>
                <td>{!t.States__c}</td>
            </tr>
        </aura:iteration>

This currently looks like "AK;AL;AR;AZ;CA;CT;CT;DE;FL;GA;HI;IA;ID;IL;IN;KY"  which does not wrap well.
Best Answer chosen by Vance Kessler 23
BalkishanBalkishan
Hi Vance,

You can use jQuery/JavaScript to remove " ; " or you can remove " ; " in your apex controller.

All Answers

BalkishanBalkishan
Hi Vance,

You can use jQuery/JavaScript to remove " ; " or you can remove " ; " in your apex controller.
This was selected as the best answer
Vance Kessler 23Vance Kessler 23
I was afraid of that. I knew that was an option. I was just hoping for something built in for such a basic operation like string formatting.
BalkishanBalkishan
For now it willl not be possible in Lightning.