Create new list item for each person indicated within a people picker column

Mar 29, 2013 at 6:42 PM
I have 2 SP2010 lists
  • Projects
  • Assigned Resources
When a resource is assigned to a project we need a new "Assigned Resource" item created for the assigned resource indicated. If multiple resources are indicated using a standard SP2010 people picker, then we need 2,3,etc. new list items created in the "Assigned Resources" list for each resource. Each resource will have their own updates, information, etc to capture per project assigned to them.

Ive successfully performed this with only one assigned resource, but am unable to do so with multiple resources.

Does anyone know how to do this???
Apr 2, 2013 at 8:43 PM
Can you show your code so far?

Apr 2, 2013 at 9:13 PM
Unfortunately I did not attempt with any SPServices code yet. I was using SPD2010 and setting the Assigned Resource column in the Assigned Resource list with the names selected from the people picker in the Projects list, which only created one new item on the Assigned Resources list. Are you aware of any SPService which will create a new item for each individual resource assigned when there are multiple people selected?
Apr 5, 2013 at 3:09 AM
No, there's no SPServices function for what I think you are doing. What you want is very specific to your own requirements.

The core of SPServices allows you to call any SOAP Web Service. You'll want to use UpdateListItrems to write values into the "Assigned Resources" list.

Apr 5, 2013 at 2:26 PM
Edited Apr 8, 2013 at 3:27 PM
Thank you Marc! I believe I can use this in conjunction with the GetListItems to obtain each of the Assigned Resource values. How would I begin the script to run on the save of the initial form?
Apr 5, 2013 at 3:31 PM
You'll want to use the PreSaveAction(). I have several posts on my blog that should help.

Apr 5, 2013 at 3:34 PM
Edited Apr 8, 2013 at 3:27 PM
Thank you so much…this sounds like it will perform what we are looking for!