​​​How to save People Picker control value in another list?

Last Update: June 22, 2018

In this scenario, we will describe how to add a new item to a SharePoint list named "Users_Test" from the current list, where the "Users_Test" list include only one column named "User" of type Person or Group. Here are the steps on how to do that:

  1. ​Open your list in design mode.
  2. Add the following to the form design workspace:
    How to save People Picker control value in another list.jpg
  3. Select btnAddUser control.
  4. In the Rules pane, click on the Add icon to add a new rule, the Rule Manager dialog will open.
    How to auto-shifting Panel control in a form2.jpg
  5. Add a new rule as follows:
    A. Change the Rule Name as desired.
    B. Change the Rule Type to Action.
    C. Change the Event Type to onClick.
    D. In the Action section, type the following script:
        var status = newListItem('/', 'Users_Test', ['User'],
        [getSiteCollectionUserID(PeoplePicker1)])
        if (status == true){
       alert('The item has been added successfully')
      }
    E. Click on the Save button to save the rule.
    Note: You can use Assistance Panel to help you adding functions and related parameters, form variables and form controls to Conditions and/or Actions sections.
  6. Test the form by clicking on the Preview button in the View Group and insert any value into PeoplePicker1 and click on "Add User" command. A new item should be added to the "Users_Test" list.