# Problem repeating item in list viewer

**URL:** https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999
**Category:** Questions about Thunkable X
**Created:** [September 26, 2018, 10:02pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999 "2018-09-26T22:02:12Z")
**Posts on this page:** 8
**Page:** 2

<div class="post-metadata">

### Author: ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)
#### Post date: [September 30, 2018, 9:37am UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/21 "2018-09-30T09:37:46Z")

</div>

Of course I will share with my community when I find the issue. I’m working really hard on understanding and I’m trying to find somebody to help me fast up a bit. I’m totally thankful to you and Mark don’t mistake on that one I was being thankful not meanful, sorry on how you understood this one 😕

Much love to all thunkers helping daily on this forum 🥰

Nice day 🙂

---

<div class="post-metadata">

### Author: ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)
#### Post date: [October 6, 2018, 2:58pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/22 "2018-10-06T14:58:02Z")

</div>

Hey @Mark and @User81, I made another type of Asynch loop but this one doesn’t seem to work :

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/7/1701c134b12215937c18e9335d68a4f1e42aa14c.png)

* * *

…Is this part :

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c40358c856b6c158dcf947fbc8cdfdac019077a8.png)

In this block from Mark’s tutorial :

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/b/5b8913047e99c19850d9f1c0d50dc8d7ae9bda1e.png)

essential to make it work ? Thanks !

---

<div class="post-metadata">

### Author: ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)
#### Post date: [October 6, 2018, 3:25pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/23 "2018-10-06T15:25:45Z")

</div>

Yes, you need some `'if'` block controlling the function call there in order to make sure that there is a way to end the loop. Otherwise, you get something called ‘infinite recursion’ .

---

<div class="post-metadata">

### Author: ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)
#### Post date: [October 6, 2018, 3:36pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/24 "2018-10-06T15:36:33Z")

</div>

But If I don’t know how many times I want it to repeat, how should I do ?

---

<div class="post-metadata">

### Author: ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)
#### Post date: [October 6, 2018, 10:14pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/25 "2018-10-06T22:14:55Z")

</div>

I should have looked more closely at your blocks. You do, in fact, have an `'if else'` block that is controlling when to end the recursion/loop. It is the one where you test for `value != "null"`. I suspect, though, that what you really want is just an `'if block'` which calls `'singleuser'` , increments the `'store'` value as you already do and calls `'do somethings'` as you already do. That will loop around as long as `value != "null"` and will stop looping when `value = "null"`.

One thing to note, though, is that I suspect that you want to pass a parameter or two your `singleuser` function, such as `value` and maybe `store`, otherwise it might be difficult for `singleuser` to figure out what to do.

-Mark

---

<div class="post-metadata">

### Author: ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)
#### Post date: [October 6, 2018, 10:29pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/26 "2018-10-06T22:29:59Z")

</div>

> [@Mark](#):
>
> you want to pass a parameter or two your `singleuser` function, such as `value` and maybe `store` , otherwise it might be difficult for `singleuser` to figure out what to do.

The thing is that the singleuser function is independant and ran only once.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f218fbc53c40f03d22e5335c00584f2bd725e341.jpeg)

Update : Is this what you were suggesting ?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f5ee244a586fa3fc9c8e587f55a76746041d75d6.jpeg)

Thanks for your help ! 🙂

---

<div class="post-metadata">

### Author: ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)
#### Post date: [October 6, 2018, 11:14pm UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/27 "2018-10-06T23:14:07Z")

</div>

Hey @Mark !

I think you made a small mistake, actually it will loop as long as the value is equal to null 🙂

But can you find why it is not working then ? Because with what you said, all seems to be fine no ? Maybe I am having the same problem as the same time where I have to wait several days for my app to get functionnal by itself ?

Update :

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f5ee244a586fa3fc9c8e587f55a76746041d75d6.jpeg)

This made it work ! Thanks again for your precious help ! Awesome day ! 🙂

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:55am UTC](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999/28 "2024-11-08T11:55:14Z")

</div>



[Previous page](https://community.thunkable.com/t/problem-repeating-item-in-list-viewer/48999.md?page=1)
