# Inserting count blocks does not change the index

**URL:** <https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930>\
**Category:** Questions about Thunkable X\
**Created:** [March 9, 2023, 5:32pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930 "2023-03-09T17:32:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 9, 2023, 5:32pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/1 "2023-03-09T17:32:59Z")

</div>

Pardon me if this question is too simple.  
In the below blocks you will see all count blocks has index as #i. I have tried all possible combinations. All of them continue to have #i. When I change the name of the index all the index name change. I dont see the option to change or generate a new index name.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d44e7f3c31239d7a96fb97915f9b0e4f0edd426a.png)  
However in the past I have added multiple counts and indices had automatically changed.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/d/ddb0026cfcb78b19f94d0eb390b82e93879af5d1.png)  
The only crude work around I know is insert a for block then I get #j. Then use the #j for the count block and delete the for block. If I need one more index, I rename #j as #k and then again insert a for block 🙂 keep doing it …  
Please advice

---

<div class="post-metadata">

**Author:** ![sketch](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sketch/32/109058_2.png) [@sketch](https://community.thunkable.com/u/sketch)\
**Post date:** [March 9, 2023, 7:07pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/2 "2023-03-09T19:07:04Z")

</div>

You can create a variable and use it as a replacement for the “i” variable.

Btw why are you using loops inside a forever loop?  
Usually this isn’t a good idea since the loops then runs forever,Wich causes your application to become unresponsible and crash.

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 9, 2023, 7:15pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/3 "2023-03-09T19:15:58Z")

</div>

Thank you for your reply. Yes creating Variable is a option but it does not look right. It comes with the word app i or app j. A long index name does not bode well. The thing is in the past when I added a new count block it automatically brought in a new index letter. Now that does not happen. Might be a Thunkable bug. The Forever I just gave as an example.

---

<div class="post-metadata">

**Author:** ![sketch](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sketch/32/109058_2.png) [@sketch](https://community.thunkable.com/u/sketch)\
**Post date:** [March 9, 2023, 7:22pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/4 "2023-03-09T19:22:28Z")

</div>

It could if it is a bug then you can report it on their GitHub page.

The “app i” variable has App in front of it because it’s a offline/app only variable.  
This is to differ the variables from cloud and stored variables.

---

<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:** [March 9, 2023, 8:15pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/5 "2023-03-09T20:15:41Z")

</div>

The key is to create a new function and give it an input variable such as “j”. The you can use that in your [count with] block.

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 9, 2023, 8:43pm UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/6 "2023-03-09T20:43:34Z")

</div>

Got it. Thanks @sketch and Tatiang. Will not file a bug

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [March 22, 2023, 12:38am UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/7 "2023-03-22T00:38:52Z")

</div>

Finally I did solve this. The solution is insert a new Screen. Insert a count block in the new screen. It comes with #i as default. Then change it what ever you want. Copy that count to your desired screen. Delete the screen. Now I have count with i, j, k and I can keep going. Have filed a bug report too.

---

<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:** [June 20, 2023, 12:39am UTC](https://community.thunkable.com/t/inserting-count-blocks-does-not-change-the-index/2315930/8 "2023-06-20T00:39:18Z")

</div>

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