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?