Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a sharepoint list which where I want to insert multi selected values from a dropdown list.

<select multiple="multiple">

My question is can anyone show a sample code/idea how can I achieve it by using ecmascript?

share|improve this question

1 Answer 1

There are at least 3 types of selection based columns: 1. Choice lists (single value and multi-value) 2. Lookup lists 3. Managed Metadata 4. Custom multi-valued columns - most complex - won't fit really as it is too complex.

There is a difference in how you would need to read/store these values. For example for Lookup you would use SP.FieldLookupValue which shall return an array, as in

function onQuerySucceeded(sender, args) { var listItemEnumerator = collListItem.getEnumerator();

while (listItemEnumerator.moveNext()) 
var oListItem = listItemEnumerator.get_current();
var selItems = oListItem.get_item('SelectedItems');
var i=0;


See here a full example http://kamilmka.wordpress.com/2012/01/10/ecmascript-client-object-model-get-the-values-from-a-multi-select-lookup-column-field/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.