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

Nintex 365 - Problems with Loops regarding Collections

Jump to solution

Hello everyone,

After looking up and down the list of HowTo's and so on and so forth, after seeing quite some video on YouTube and after trying almost every combination of varible types, I kind of fed up with not being able getting an "easy" website workflow up an running. I would really appreciate your help and time!

 

Aim :
Query list of checked out documents and check them in .

Give me a counter of successful cycles and a lookup for the name of document within the loop.

 

Error:

### An unhandled exception occurred during...
System.ArgumentNullException: Value cannot be null. ###


Explanations:

[Action Item]
Property = [Value]

 

######################################

[Query List]

List = [Documents]

Filter = [Checked Out To]

     Property = [Name]

     [is not null]

 

[Count Items In Collection]

Target = [collection_ID]

     Type = Collection

Total items = [numTotal]

     Type = Integer

 

-- until here it seems working
-- [numTotal] = 3 for the 3 checked out documents


[For Each]

Input Collection = [collection_ID]

     Type = Collection

Output Value = [list_ID]

    Type = Integer                                     <== HERE IS MY PROBLEM                 

Output Index = [numIndex]

     Type = Integer

 

[Set Variable] > used in [Protocol]

Variable = [txtDocName]

     Type = Text

Value = [LIST LOOKUP > SOURCE : Documents

                                       | FIELD : Name

                                       | WHEN : ID

                                       | EQUALS : Workflow Variable [list_ID] ]

 

[Check In Item]

Item = [Documents]

Where : [ID] EQUALS Workflow Variable [list_ID]
Check In Type : [Use Library Settings]                       

-- [check in type] is the absolute default, no checkout neccessary i.e.

 

Where is my faulty thinking leading to that mistake?
I tried for type TXT , INT , NUM , GUID and even DIC in my desperation for [list_ID], but none worked. How can I fix that?!

Best regards from Germany,
Andy.

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Nintex 365 - Problems with Loops regarding Collections

Jump to solution
Hi,

Make sure in your query List you set the "Output Type" to "Separate output per column" (This is the key).

You can then use a Text Variable in your For Each "Output value".
Then use this Text Variable in your Check in Item action Where ID equals the text variable.

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: Nintex 365 - Problems with Loops regarding Collections

Jump to solution
Thank you. Sorry, I'm late saying this. This is quite a trick to get things working!
0 Kudos
Reply