+ Start a Discussion
RajnisfRajnisf 

Replace muli picklist semicolon in aura iteration in lightning component

Hi Guys,

Need an urgent help.

<div class="card__categories"> {!item.Categories__c}</div>

In aura iteration i want to display Categories (multi picklist field). Can someone let me know how to replace semi colons with comma in lightning component.

for example :  something like this.. but substitute does not work here...
<div class="card__categories">{!substitute(item.Categories__c, ';', ',')}</div>


Thanks,
Rajni
Prasanna Kumar Tummala 2Prasanna Kumar Tummala 2

Hello Rajni, 

As of now salesforce has not directly provided expression function. Say replace,subtitute in component level.
So we can replace the semicolon with comma either in Js controller or helper. 

Please refer the following link for available expression functions given by salesforce

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_functions.htm

 

For more details, drop us a note at https://www.etggs.com/contact-etg/
Thanks,
Prasanna Kumar Tummala
ETG Global Services
www.etggs.com