Solved

Nintex 365 - Problems with Loops regarding Collections

  • 28 August 2019
  • 2 replies
  • 17 views

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.

icon

Best answer by SimonMuntz 2 October 2019, 08:26

View original

2 replies

Userlevel 6
Badge +22
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.
Thank you. Sorry, I'm late saying this. This is quite a trick to get things working!

Reply