# Having trouble iterating through the rows of a table

**URL:** <https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866>\
**Category:** Questions about Thunkable X\
**Tags:** help\
**Created:** [October 9, 2024, 11:18pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866 "2024-10-09T23:18:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![siwm14622lkniy](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@siwm14622lkniy](https://community.thunkable.com/u/siwm14622lkniy)\
**Post date:** [October 9, 2024, 11:18pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/1 "2024-10-09T23:18:11Z")

</div>

I’m trying to iterate through the rows of a table. For some reason, it isn’t going over each row once it’s going over it twice. The result I expected was Julia,Madeleine,Tina,Eva

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a6f742426f396e4e66a80d8dc78b05f2e4904436.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/5/55cbae2a1a49375a10f1b6850eea81a0e89a8ed7.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/da843e7116703f326ee305d9612534e923dde594.jpeg)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 10, 2024, 12:20am UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/2 "2024-10-10T00:20:24Z")

</div>

Can you post a link to your project? It shouldn’t be looping twice. Try setting app variable myNames to `empty list` right before the `count with` loop starts.

---

<div class="post-metadata">

**Author:** ![siwm14622lkniy](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@siwm14622lkniy](https://community.thunkable.com/u/siwm14622lkniy)\
**Post date:** [October 11, 2024, 7:19pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/3 "2024-10-11T19:19:53Z")

</div>

[https://x.thunkable.com/copy/c46d21a6f6aff16dbdc18031f93f4096](https://x.thunkable.com/copy/c46d21a6f6aff16dbdc18031f93f4096)

it works now that I set it to an empty list, which is good, but im still not sure why that’s necessary

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 11, 2024, 7:59pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/4 "2024-10-11T19:59:46Z")

</div>

I’m not sure why either, to be honest. It seems like a bug that that’s required.

---

<div class="post-metadata">

**Author:** ![knownkeep](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@knownkeep](https://community.thunkable.com/u/knownkeep)\
**Post date:** [October 12, 2024, 12:54pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/5 "2024-10-12T12:54:12Z")

</div>

> [@siwm14622lkniy](#):
>
> it works now that I set it to an empty list, which is good, but im still not sure why that’s necessary

FWIW, I’ve had better luck creating/initializing all app variables in my Home screen (whatever is 1st to load). At a minimum, I initialize variables in the screen that shows PRIOR to when I need them.

I then, as @tatiang recommended, clear/empty any variables on screen open.

I’ve also had random issues/bugs with stored variables, so any variables I want to store now, I save to a local datasource table instead of depending on the concept of stored variables. I find the table storage to be consistent.

---

<div class="post-metadata">

**Author:** ![siwm14622lkniy](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@siwm14622lkniy](https://community.thunkable.com/u/siwm14622lkniy)\
**Post date:** [October 12, 2024, 3:32pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/6 "2024-10-12T15:32:15Z")

</div>

thanks for the advice 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [January 10, 2025, 3:32pm UTC](https://community.thunkable.com/t/having-trouble-iterating-through-the-rows-of-a-table/3260866/7 "2025-01-10T15:32:45Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
