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

Does UserMulti field have a limit on how much users are selected? I'm asking this because when I use client object model I can set at most 15 users at once.

edit: I can add more users directly on SharePoint. So the question is if there is a limit on how much users can be set on UserMulti using client object model?

edit: I discovered some funny pattern... each odd user in the list is added correctly, but each even is not...

var users = new List<FieldUserValue>();
//for loop in which I add users to list like this 
//users.Add(new FieldUserValue() { LookupId = someId });
item["myUserMultiField"] = users.ToArray();
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

When you save the users into the item, you need to delimit them with ;#.

For example, 44;#Barack Obama;#43;#George Bush;#42;#Bill Clinton. I think you can even get away with specifying only the IDs but you still need the delimiters.

See a similar issue on StackOverflow.

share|improve this answer
    
Will try it tomorrow at work, thanks! –  Andrej Cimperšek Aug 4 '11 at 19:37
    
Hmm, on the client side you can't set LookupValue on the lookup field, only LookupId... Do you think I should try without using a list of FieldUserValue and instead build a string delimted like that in your example? On the server side you have SPFieldUserValueCollection but there is not FieldUserValueCollection on the client side. –  Andrej Cimperšek Aug 5 '11 at 9:29
    
Worth a try! :) I don't have 2010 so I can't test. –  Kit Menke Aug 5 '11 at 14:15
    
How were you able to submit multiple names into your user field with object client model –  user6488 Jan 19 '12 at 23:15
    
@JoeL: Probably the easiest way is to build a string of the user IDs and put it in the item. For ex: item["myUserMultiField"] = "1;#anything;#52;#anything";. I think that is what Andrej got working. –  Kit Menke Jan 20 '12 at 16:17
add comment

Your Answer

 
discard

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.