Proper Format to Populate PeoplePicker Field in Lists.xml - Community forums - Akumina Community

Community forums

Forum Navigation
You need to log in to create posts and topics.

Proper Format to Populate PeoplePicker Field in Lists.xml

What's the proper format to populate a PeoplePicker field? I have this list XML:

<list name="BC_HR_ContactsList" noCrawl="TRUE">
    <Field Name="HRName" DisplayName="HRName" Type="User" UserSelectionMode="PeopleOnly" UserSelectionScope="0" />
  </list>

How would I go about adding users to this list through the Lists.xml file in Site Deployer?

Jermaine:

In order to add a user in the lists.xml or update.xml try this format:

<Field Name="BC_HR_ContactList">-1;#username</Field>

 

This works in my SPO tenant.

 

Mark:

Much appreciated sir. I'm sure you tested this as well, but I was able to make it work with my username and my full email address.

-1;#Jermaine.Snipe
-1;#Jermaine.Snipe@testbhealth.onmicrosoft.com
//]]>