Error: Index property is greater than the number of items in the collection.

  • 24 January 2019
  • 2 replies
  • 18 views

Badge +1

I have working with a workflow to build a repeating section.

I have a collection (coll_BusinessUnit) where I get all items when ID is the same.

When the workflow is within the For Each, it suspends and I get the following error: Index property is greater than the number of items of item collection.

I have a counter for the collection, and it counts 10 items. I tried to set the variable to 0 and sum 1 in the For Each, but it doesn't work.

Any idea?

222710_pastedImage_2.png

222711_pastedImage_3.png


2 replies

Userlevel 5
Badge +14

This is interesting. Are you removing anything from the Collection inside of the For Each loop? 


Userlevel 2
Badge +11

Is numIndexBU maybe used to get the index in the ForEach action? If so, adding 1 will put the index too high for the ForEach to normally terminate.

Or are you using numIndexBU to get an element from another collection (which has lesser items)?

Reply