+ Start a Discussion
niharnihar 

How to Changing Semicolon from Multi-Select Picklist values to a Comma


In select field only Changing Semicolon from Multi-Select Picklist values to a Comma
not in next field


User-added image
Best Answer chosen by nihar
niharnihar
Hi sandhya , manohar ,
I completed my task by trigger :
trigger Household on Household__c (before insert,before update) {

    for (Household__c record : trigger.new)
{
    if (record.select__c != null)
    {
        record.select__c = record.select__c.replace(';', ',');
    }
}
   
    
    }User-added image

All Answers

Manohar kumarManohar kumar

Hi Nihar, you could use string replace variable to do this. 

select1 = select.replace(';', ','); 
something like this should work.. you cannot change in select field it self, its how multiselect fields are getting save.. 

try making one trigger to update select1 field. 
Please let me know if you have any questions. 
Thanks,
Manohar

niharnihar
thanks Manohar,
My client requirment is to do in the same field only not any other fields..................................
SandhyaSandhya (Salesforce Developers) 
Hi,

I have not tried but found the below link which has the formula for the same.

https://salesforce.stackexchange.com/questions/179199/a-copy-of-changing-semicolon-from-multi-select-picklist-values-to-a-comma/179204
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
 
Best Regards
Sandhya
 
niharnihar
Hi sandhya,
 I tried formula field but my client want in the same field not other fields..............
niharnihar
Hi sandhya , manohar ,
I completed my task by trigger :
trigger Household on Household__c (before insert,before update) {

    for (Household__c record : trigger.new)
{
    if (record.select__c != null)
    {
        record.select__c = record.select__c.replace(';', ',');
    }
}
   
    
    }User-added image
This was selected as the best answer