Copy item from one list to another, using Sharepoint designer workflow

26 July, 2008 (16:27) | MOSS - Customization with SPD | By: GVK

If you are looking to copy list items from one Sharepoint site to another programmatically, please have a look at this post

In this post you will learn how to copy list items from one list to another using Sharepoint Designer workflow, for this you need basically two lists, Source List and Destination List

Source List

Source List

Copy Item Workflow - Sharepoitn Designer

Copy Item Workflow - Sharepoint Designer

Source List

Source List

Destination List

Destination List

Create two custom lists:

Source List (below are columns and column types)

Employee Id (Single line of text)

Employee Name (Single line of text)

Designation (Single line of text)

Age (Single line of text)

Destination List (below are columns and column types)

Employee Id (Single line of text)

Employee Name (Single line of text)

Designation (Single line of text)

Age (Single line of text)

After creating the two lists:

  • Open site in Sharepoint Designer 2007
  • Click File > New > Workflow, which opens Workflow Designer window
  • Enter the name of the workflow in the appropriate box
  • Select the list name (Source List) from ‘what sharepoint list should this workflow be attached to‘ dropdownlist
  • After selecting the list from the dropdownlist, select at least on checkbox from the following:

    Allow this workflow to be started manually from an item

    Automatically start this workflow when a new item is created

    Automatically start this workflow whenever an item is changed

  • Click Next
  • Enter the Step Name in the appropraite box
  • Click on the Conditions buttons and select the ‘Compare Source List item
  • Click on the field and select the field name (Age), like that give the condition like if source list greater than Age
  • Now, click on the Actions button to perform what action to be done if the condition is satisfied
  • Select Copy list item
  • Select the current list (Source list) and then select the Destination list (where to copy the item)
  • Again, Click on the Actions button and select ‘stop the workflow‘ and enter the message

Now, try to add the item in the source list (Employee Id, Employee Name, Designation, Age)

If the age is greater than 25 then the row will get update in the destination list too.

Comments

Pingback from Copy Sharepoint list items from one site to another programmatically
Time August 25, 2009 at 6:13 am

[...] my earlier posts, I have show you how to Copy items from one list to another, using Sharepoint designer workflow now we learn how to copy list items from one Sharepoint site to another site [...]

Comment from Catherine
Time September 24, 2009 at 2:57 pm

when using ‘copy list item’ in designer, 2 fields (identical names, types, descriptions and settings) will not copy to another list. All other fields do. Any thoughts…. things to look for?

Comment from Andrew
Time October 15, 2009 at 2:04 pm

This is great! How can this be done with two lists on two different sites?

Comment from G Vijai Kumar
Time October 15, 2009 at 2:09 pm

@ Andrew: Thanks for looking into the post, if you want to copy list items from one site to different site you can accomplish this programmatically, I have already posted an article on this, please have a look into http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/

Comment from Naresh
Time January 15, 2010 at 10:02 pm

H Vijay, can we apply this work flow to all of the items with in a sharepoint Library like a loop through all the items even if the item is a result of past upload.

Comment from G Vijai Kumar
Time January 18, 2010 at 7:12 am

@Naresh: Work flow starts when an item is created, try the programmatic way explained on the link http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/ for copying the past created items, also I have posted a comment on updating created, modified and modified by columns too
Thanks for looking into the post

Comment from David McVey
Time April 23, 2010 at 2:41 am

I’m trying to copy an infopath form from the source list to a destination list but I need to have security imposed so that everyone can access the source list but not the destination list. My SPD workflow fails due to users not having permissions to the destination list. Any thoughts on temporarily allowing access to copy using SPD then removing the access? Using InfoPath 2007 and MOSS 2007

Comment from cally
Time May 24, 2010 at 3:11 am

hi..but what if we modify the list..does the destination one gets updated..if not..how do we work around this

Comment from G Vijai Kumar
Time May 25, 2010 at 6:13 am

@ Cally: The above workflow only starts when the item is added and after the conditions satisfies, you have modify the workflow to get update the already existing items

Write a comment