Wednesday 19 March 2014

Automatically create Items in a SharePoint Library using a SharePoint Designer workflow

There might be some requirements like create an item automatically in a library/list when an item is added in to a different library/list.

For this create a workflow in SharePoint designer for first Library which creates a new Item on second Library with the given item values and set the workflow to "Start workflow automatically when an item is created". Steps are as follows

Step 1. Add a Create List Item action.


Step 2. Click the “this list” link, and in the dialog box, select the document library to which you attached your custom content type. This will give you two values to fill out, one for the Content Type ID and one for the Path and Name, the latter being a required field in the Document content type.

Step 3. You can add different columns which you want to be auto populated by the column values from first list. For this create the Columns you want in the second list and map with corresponding columns with first list columns as shown in the below screen.

If the selected list is a form library the Content Type ID will be Form, or it is a document library the Content Type ID will be Document.
Step 4. Modify the “Path and Name” value to [%Current Item: Name%]. If you want a word document to be created, just change the value of Path and Name field as [%Current Item: Name%].docx
Step 5. Click OK. Save and publish the workflow.
 
Go back to your SharePoint list that’s associated to workflow you just created and create a new item.  When the Create Item action is executed, a new entry should be created in your second List and columns also auto populated from first list.

Hope this helps..