SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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.