Community forums
Proper Format to Populate PeoplePicker Field in Lists.xml
Quote from Jermaine Snipe on December 18, 2019, 1:48 pmWhat'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?
What's the proper format to populate a PeoplePicker field? I have this list XML:
How would I go about adding users to this list through the Lists.xml file in Site Deployer?
Quote from Marc Hemstreet on December 19, 2019, 9:16 amJermaine:
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.
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.
Quote from Jermaine Snipe on December 19, 2019, 12:06 pmMark:
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
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.