# How add Sequence Numbers To List

**URL:** https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [March 6, 2021, 9:32pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038 "2021-03-06T21:32:53Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 6, 2021, 9:32pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/1 "2021-03-06T21:32:53Z")

</div>

How can Add Sequence Numbers To List Viewer  
(data from Firebase)  
as  
 ![list sekence](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/a/cad1fe4a0229d88de191f08ef18aed7cdf46e608.png)

---

<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 6, 2021, 9:37pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/2 "2021-03-06T21:37:17Z")

</div>

In the legacy interface, I think you could use a row with a column inside of it next to the list viewer to align those numbers. But I’m not sure how much control you have over line spacing in the column.

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 6, 2021, 9:40pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/3 "2021-03-06T21:40:12Z")

</div>

i cant get it here… i searched any idea to add column and make the numbers… but i cant

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 6, 2021, 9:42pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/4 "2021-03-06T21:42:27Z")

</div>

There are more than one way,

Declare a variable and set it to 0 then with every loop through your data list in Firebase you use the change block by 1.

You will need to use the join text block to show the number and next to it the data from your database.

Another way is when you know how many elements from your database you can create a list of numbers the same size and again loop through your data joining the number from list of numbers and the data from your database.

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 6, 2021, 9:45pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/5 "2021-03-06T21:45:47Z")

</div>

thanks a lot Mr. muneer …i will try your ways and i wish make it

---

<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 6, 2021, 9:45pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/6 "2021-03-06T21:45:56Z")

</div>

I was able to make it sort of work the way I described. But I don’t know how you fix the line spacing.

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

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 6, 2021, 9:47pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/7 "2021-03-06T21:47:43Z")

</div>

@tatiang if you just prefix the number to the element in the list viewer you will make an ordered list.

---

<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 6, 2021, 9:48pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/8 "2021-03-06T21:48:33Z")

</div>

Good point!

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 7, 2021, 10:13pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/9 "2021-03-07T22:13:29Z")

</div>

i am sorry muneer  
can u tell me whats the wrong in this example  
its success when make the two list manual (1 as 2) but when list get from firebase not display anything  
 ![TEST](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/86a1d19338f3e39b38100bfcbc922807bd764209.png)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 8, 2021, 10:08am UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/10 "2021-03-08T10:08:24Z")

</div>

One thing I would do is to check that list 1 actually has entries before starting the loop to parse the two lists together.

Another thing to point out… You only need to assign the list 0 to the list viewer at the end of the loop so take this block outside the loop.

A suggestion  
When testing the project, it is not a good idea to code a destructive loop that removes the entries from the list. this means you can only use the button once and if you want to try it again you will have to exit the app and start again. I would use something like:

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

Hope this helps

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 8, 2021, 10:14am UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/11 "2021-03-08T10:14:12Z")

</div>

Following to sample screen result from the above code.  
This is when the list from Firebase is empty  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/7539e1d678d871b732ee4bf2ef788de1bfd09fd1.png)

This is when the Firebase list contains data  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/4/6493de5ed5fce845e40d9f4baeaaeea5c9314c73.png)

Happy Thunking!

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 8, 2021, 8:54pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/13 "2021-03-08T20:54:24Z")

</div>

i 'm so sorry mr muneer but i cant do it whats the problem here With Firebse  
 ![with fire](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/4/44c4385b67c08009f3fcedf0eadc2391c52ca19a.png)

Two List  
 ![TEST](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6ece0a2a316c346e52629e36475faa115dea903d.png)

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 8, 2021, 8:59pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/14 "2021-03-08T20:59:44Z")

</div>

Work Well With Two List Manual But Not With Firebase

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 8, 2021, 9:04pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/15 "2021-03-08T21:04:01Z")

</div>

Check that you are getting data from Firebase. Also when using the GET block of Firebase, check the error green block. Maybe there is an error or maybe your block gives no data.

In your code block, you are getting data from Firebase in `list2` so in the code for Button9 check the length of `list2`. You are checking the length of `list1`. If `list2` is empty you will see in the list viewer  
لا يوجد بيانات

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 8, 2021, 10:21pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/16 "2021-03-08T22:21:38Z")

</div>

i tried a lot but it what i get .  
test firebase blocks return all data

![TEST](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa49ee517db4ebffedc9688de468cf1052b42041.png)

 ![with fire](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/6/1664a00dcc4ad5ddd3497346b57f6757331a82b0.png)

if i remove list from block of (get firebase) return “0”

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 8, 2021, 10:54pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/17 "2021-03-08T22:54:22Z")

</div>

Instead of list in the Firebase get block use  
[app variable list2] [get object properties of] [value]

![getprops](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/a/ca7192737d272489beca8a7647973821ff04e3b8.png)

If you can provide a screenshot of your Firebase database so I can see how the data is stored and can help you of what block to use. Currently try with the block here which will be in place of the list you have in the get (Firebase block) and let me know.

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 9, 2021, 7:52pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/18 "2021-03-09T19:52:49Z")

</div>

So thanks Mr Muneer  
i make it by “get object properties”  
Now  
How I get That in List 2

![with fire](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/9/59e1218bc74c31f98f70a8317b861adc5f7c3dc5.png)  
Sub of each country

i wish dont be Inconvenience for u

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 9, 2021, 8:09pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/19 "2021-03-09T20:09:16Z")

</div>

I did not understand.

If you mean you want to retrieve what is under each entry in the first list then you need to go through a loop.

For now, if you want to get the **Sub of each country** you can reference the first one like this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/0/c0cf2330dad86f332c93f93642a36feb733e2691.png)  
Put this where you have the arrow to get the first sub country.

---

<div class="post-metadata">

### Author: ![marketandsellbuy8jcb](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@marketandsellbuy8jcb](https://community.thunkable.com/u/marketandsellbuy8jcb)
#### Post date: [March 9, 2021, 8:23pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/20 "2021-03-09T20:23:10Z")

</div>

OK  
I Want to get list1 Newyork , list2 Numbers of citizen  
and each united appear in list beside No. of it  
What should i put Replace “arrow”

i make that but i dont know if right or no  
 ![with fire](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/e/be49dacb8b11c844975ccb0824407e76489a055b.png)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 9, 2021, 8:34pm UTC](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038/21 "2021-03-09T20:34:12Z")

</div>

Sorry, I did not understand.

Because I do not know what data is available in your database, it is very hard to answer questions about how to select the data from Firebase.

[Next page](https://community.thunkable.com/t/how-add-sequence-numbers-to-list/1149038.md?page=2)
