Skip to main content
Nintex Community Menu Bar

How to copy a collection to a list

  • August 13, 2017
  • 6 replies
  • 9 views

Forum|alt.badge.img+7

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.

6 replies

rhia
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • August 13, 2017

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


Forum|alt.badge.img+16

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.


Forum|alt.badge.img+7
  • Author
  • August 14, 2017

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


Forum|alt.badge.img+7
  • Author
  • August 14, 2017

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?


Forum|alt.badge.img+7
  • Author
  • August 14, 2017

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.  


Forum|alt.badge.img+16

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: