I'm having some some trouble setting up a workflow to add or copy items from one list to another. I have browsed the forums but came up with nothing.
I have three lists.
List A - Projects
List B - Associated sub-tasks for project (with accompanying lookup field to List A)
List C - A standard set of tasks depending on the type of project created in List A
So, I'd like to copy all those items from List C, to List B, when the user creates a certain type of project in List A.
- I've setup the workflow to start on new item creation in List A, conditional on the type of entry.
- However, I have been unsuccessful in copying or creating new items in List B using the standards in List C.
I think I need more of an overview of how to approach this.
Do I use a collection variable, a for-each loop, and create multiple items looping through each item in the collection?
Is it necessary to have all columns the same (same # of columns too) in the two lists if I use the copy function?
I'm using Nintex 2010 and SharePoint 2010.
Any help is appreciated.
Solved! Go to Solution.
To work with 'Copy item' action,
And also in order to copy multiple items from 'List C' to 'List B' in your workflow('List A') use 'Collection Operation' and 'For each' actions (i prefer to get items ids from List C) to pull information from 'List C' with some conditions and use 'Copy item' action to copy multiple items from 'List C' to 'List B'.
Also i prefer don't use conditional start in your workflow settings it may lead to cancel/fail the workflow if so many items found to copy from 'List C' to 'List B'. Instead set workflow option to start on item creation and inside workflow use 'Run If' or 'Set a condition' action to check any field value is equal to specific value and clear the value at the end of workflow.
Thanks for the advice. Will include a 'Run If' or condition within the workflow rather than conditional start. I think my problem was the two lists had different columns as I hadn't paid enough attention while building them. Thanks again!
I have a very similar requirement. I need to copy child Items between two lists with each having the same columns.
However, I don't see a Copy Item Action in my Nintex for Office 365 Designer ( only copy document). My initial thoughts are again similar to the approach in the answer above:
. I want to minimise having to store each column per each selected row in shadow variables as in Separate output per column. Anybody tried this?
Quick update: I have able to populate a dictionary ' row ' with each child list item but as far as I can see this isn't a way to readily use this to insert each item in the destination list - makes a handy debug Log entry tho. Will need to use separate column variables instead and then use these in each insert.