0

I am trying to import a CSV to a SharePoint list which is working for all the field types I need except where the field is Person or Group and it allows multiple selections. I have a Person field where multiple selections are not allowed:

$listItem["SinglePersonField"] = $web.EnsureUser($csvRow.AssignedTo)

The CSV holds the user's email address

I can format the CSV so the multiple users are in one column or several. I tried building a string but it's not working unless I use EnsureUser. Is there a way to ensure multiple users and append them to the multi person field?

1
  • You’ll need to use a foreach structure and ensure each of the users, and put each of them in an array. Then assign the array to the value of your field.
    – sasfrog
    Mar 23, 2019 at 6:34

1 Answer 1

0

You can put multiple users in a column and use semicolon to spit users. Then ensure each of the users.You could check this article for more:

http://www.sharepointdiary.com/2013/07/import-from-csv-to-sharepoint-list-with-people-picker.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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