I have to update a list after I insert an item in another list. For example, I have the main list with a person's details (name, age, address, email etc.). When I insert new person to this list, I want that another list will be inserted automatic a new item with the name and email only.
-
2You can do this without code using a workflow. Loads of example on the web.– BunzabMay 21, 2017 at 14:18
-
Welcome to SharePoint StackExchange , Could you please take a quick tour at sharepoint.stackexchange.com/tour to get an informed badge! Thank you for your contribution!– Mohamed El-Qassas MVP ♦Jun 7, 2017 at 19:35
1 Answer
You have two options:
Using SharePoint Designer. (No code)
- Open Sharepoint Designer > click on the workflow > new list workflow.
- Click Actions > List Actions > Update List Item.
- Click this list.
- In the Update List Item dialog box, change the List to your destination list.
- In the Find the List Item section, change the Field list value to the name of the ID field in your second list.
- Click the Workflow Lookup icon, In the Define Workflow Lookup dialog box, change the Field list value to the name of the ID field in the second list.
Using Event Receiver. (Require code)
You can create an event receiver on Item added to add to another list, to know how to create an event receiver check Creating Simple Event Receiver in SharePoint 2013