cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to update multiple list items with Nintex Workflow 2013 (Destination is lookup field!)

Jump to solution

Hallo there,

I'm new here and I have a simple question. I have a list with a column "StoreNr" (type = text) und another column "Store" (type = lookup). The list has over 4000 elements and I need a Nintex workflow, which copies "StoreNr" (text) to "Store" (lookup) --> see picture:

14-11-2014 13-24-30.png

All values in "StoreNr" exists as elements in the lookup list.

I tried "Update multiple items" workflow task to solve the problem ...... without success. If the destination is a text field, the copy succeeds. If the destination ist a lookup field, the copy fails ... destination keeps empty.

Is there a simple solution for this issue?

Thanks for help ...

Labels: (2)
Reply
5 Replies
Workflow Hero

Re: How to update multiple list items with Nintex Workflow 2013 (Destination is lookup field!)

Jump to solution

It sounds simple, but it takes one interesting Update Item action. To do this, build a site workflow (can be a list workflow, but you could accidentally run this a lot of times, which can be bad.) In the workflow create two variables, a collection variables to store IDs in, call it colIDs maybe. A number variable, currentID. Add three actions, Query list, For Each, and in the For Each, add Update Item.

  • Query List
    • User your list
    • no filter, select all (or just items with blank values in the lookup field. If you do this, then the workflow can be an update workflow and can run multiple times without going through all items again).
    • Select field ID and store in the collection variable colIDs.
  • For Each
    • Target Collection: colIDs
    • Store result in: currentID
  • Update Item
    • Update: Your list to update
    • Where: ID equals Workflow Data currentID
    • add field Store (the lookup field)
    • Store equals List Lookup
      • Source: Store(list name of the lookup list)
      • Field: ID
      • When: Title?(this will be the column in the lookup list that has the same value as StoreNr does in the list being updated)
      • Equals: List Lookup
        • Source: Your list to update
        • Field: StoreNr
        • When: ID
        • Equals: Workflow Data: currentID

So what this trying to do is loop through all the items in your list to update, and fetch the ID values of the lookup item to update each item one at a time. You have to loop in this way to get the unique values of each storenr per. The lookup back to the lookup list is to get the ID of the item, which is necessary value to put in the lookup Store field. Run the Site Workflow once and the items should update.

It is kinda crazy, but let me know if it doesn't make sense.

Reply
Not applicable

Re: How to update multiple list items with Nintex Workflow 2013 (Destination is lookup field!)

Jump to solution

Hello Andrew,

it makes really sense .... thank you very much for your quick answer. Here is the result:

17-11-2014 10-01-18.png

You solved my problem. Thanks for your time and know how.

Greetings,

Mirko

Reply
Not applicable

Re: How to update multiple list items with Nintex Workflow 2013 (Destination is lookup field!)

Jump to solution

Thank you,
Very useful stuff. Spent several hours on this problem.

Reply
Not applicable

Re: How to update multiple list items with Nintex Workflow 2013 (Destination is lookup field!)

Jump to solution

Worked Perfectly. Thank you.

Reply
Workflow Hero

Re: How to update multiple list items with Nintex Workflow 2013 (Destination is lookup field!)

Jump to solution

Hi, Andrew, 

Useful Stuff. Thank You. My problem is advance! what if i want to query multiple libraries and update value in each library from StoreNr" (text) to "Store" here in this example. 

I have created master list which stores all lib names and GUID's. Query- GUID Coll and stored in varGUIDunique. for each GUID (Lib) i want the fld Store to upadate with StoreNr value. 

Thank you for help in advance!

0 Kudos
Reply