SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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 list similar to the usual Tasks Sharepoint List and I introduced the field assigned to as a multi user field like this (I have read somewhere that with Mult option should always be set to TRUE) :

<Field ID="{E942F982-C798-4095-8FD3-AF9A3A374862}" Type="UserMulti" Mult="TRUE" Name="AssignedTo" DisplayName="Assigned To" Group="My Local Group"  StaticName="AssignedTo" ShowInEditForm="TRUE" ShowInNewForm="TRUE" SourceID="" />

to set this field I created a control to get the users:

UserField AssignedTo = new UserField();
AssignedTo.FieldName = ActionsCommercialesManagement.Fields.AssignedTo;
AssignedTo.ID = "AssignedToID";
AssignedTo.ListId = TaskListID;

and to recuperate the introduced userS in my AssignedTo userField control I tried to do something like this but it didn't work :

newItem = MyList.AddItem();
newItem["AssignedTo"] = new SPFieldUserValueCollection(ACAssignedToID.Value.toString());

So any ideas ????

share|improve this question

if anyone is having this problem I just solved it :

SPFieldUserValueCollection assignedUsers = new SPFieldUserValueCollection(myWeb, AssignedTo.Value.ToString());
item["AssignedTo"] = assignedUsers;

and if you want to retrive the value collection as string all you have to do is :

string spliAssignedTo =((SPFieldUserValueCollection)TaskItem["AssignedTo"]).ToString();

Hope I helped :)

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.