You need to sign in to do that
Don't have an account?
Cyclebiff
How are multi-select picklist data stored?
I have a custom multi-select picklist that I'd like to concatenate into a string, delimited by commas.
I'd like to do this through APEX -- any quick and dirty suggestions?
Or at least how is the data stored?
They are returned as a semi-colon delimited list of values (i.e. "Value 1;Value 2;Value 4"). You should be able to change the values to commas using:
MyMultiSelectField__c.replaceAll(';',',');
All Answers
They are returned as a semi-colon delimited list of values (i.e. "Value 1;Value 2;Value 4"). You should be able to change the values to commas using:
MyMultiSelectField__c.replaceAll(';',',');
If you're doing some type of "form post", you must use the HTML standard method of:
If you're using Apex or the API, then you would use the semi-colon notation.
Hi,
How to pass value of a string to a multi picklist field of an object using apex code.
I have a value stored in a string as:
string str =
In Apex Code, you would just assign the string to the multiselect variable using the notation you posted. When you save the record, it will be stored as multiple values in the multiselect picklist.
Hi SFDCFOX,
Thanks for your reply. The issue was with my code.
Now its working fine can pass directly a string to multipicklist.
Thanks again!