cancel
Showing results for 
Search instead for 
Did you mean: 
sshaffer
Nintex Newbie

How to copy a collection to a list

Hello,

I am trying to query a list called "RequestTypeSteps" and load it into a task list called "RequestTasks".   

I used "Query List" to get a collection (see screen shot below).  I have 6 collection variables in my Query List to capture 6 of the fields from the RequestTypeSteps.  I also want to associate it with a RequestID which I previously saved. How do I copy this collection into RequestTasks which has the same data structure with an additional RequestID field.

Labels: (2)
Tags (2)
Reply
6 Replies
Automation Master
Automation Master

Re: How to copy a collection to a list

Do you want each set to be its own row in the list, with but all sharing the same RequestID? 

0 Kudos
Reply
Automation Master
Automation Master

Re: How to copy a collection to a list

Hi ‌ - you don't need to have it in your collection you just need to add it to your "create item" action inside your for each loop.

0 Kudos
Reply
sshaffer
Nintex Newbie

Re: How to copy a collection to a list

Yes, I'd like each set to be its own row in the list shareing the same RequestID.

0 Kudos
Reply
sshaffer
Nintex Newbie

Re: How to copy a collection to a list

The For each loop specifies only one field, right?  I have used a For Loop, but only one field was added.  But how do I get multiple fields within each row added?

0 Kudos
Reply
sshaffer
Nintex Newbie

Re: How to copy a collection to a list

I figured out a way to get this done, but I assume there is a much more efficient way. For each item in my collection, I assign the collection variable to an item variable and then use Create Item to update the row in my RequestTasks table.

The create item configure screen is blow.  

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: How to copy a collection to a list

I would do this slightly differently in that in my first query list I would pull back only the IDs so that I have a collection of IDs.  then inside my for each I would query the list again using the current ID in the collection as a filter and pull back all the other fields into separate variables, and then use a create item with all of those.

see an example here:

Reply