15
Views
6
Comments
Detected a recursive iteration over the same list and index  is out of range error
Application Type
Traditional Web
Service Studio Version
11.10.3 (Build 36711)

I have a searchable table that reads from list when using a specific filter after filtering it gives me 2 errors as the attached screenshot  : 

  • Detected a recursive iteration over the same list.
  • index 1 is out of range

note that the number of elements on the table before searching is 1 .

after searching i assign the new fetched records to the list that the table is reading from.

when refreshing the table i get theese errors.

search button is set to ajax submit.

I've extracted the refresh widget to a new action which is executed by a widget click  and the same problem exists 

Rank: #89

Hi  Muhamed Akl,

create one varibale for list with same datatype like - listcopy

when ever you assign data copy all data in a list and using loop on it.

if you are using two time loop on a same list than this issue occur so use second time copy list .


Regards

Rahul


Rank: #10332

Hi Muhamed,

The index 1 is out of range error pr7obably has something to do with the start index of the loop. The default index is 0, so if you only have 1 record in the table only index 0 will exists. If you make the loop start at index 1 it will be out of bounds. 

If I understand correctly you are looping the list first, appending records to that same list and then trying to go through it again before returning the first loop, correct? You will have something like this.


This is not allowed an will give you the recursive iteration error. I am not really sure what you are trying to accomplish with your search so providing the answer is difficult. You are trying to filter a list that has 1 record, but the filtering should get records from a different table and append them to the list?