# \[Solved\] How do I add items to the beginning of a list?

**URL:** <https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692>\
**Category:** Questions about Thunkable X\
**Tags:** solved, beginner, list\
**Created:** [October 9, 2019, 2:56am UTC](https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692 "2019-10-09T02:56:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rongill100percentbho](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@rongill100percentbho](https://community.thunkable.com/u/rongill100percentbho)\
**Post date:** [October 9, 2019, 2:56am UTC](https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692/1 "2019-10-09T02:56:45Z")

</div>

Hi, Thunkable. I seem to be having an issue with lists on my application. The application has one screen with one label in the center. I think that the following code should set the label to say “3”, but the application just freezes at this point, and refuses to do anything else.

 ![30%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/1/c18ea0071b80f3665afd3c933e955030fa0fdc2b.png)  
Is there anything I am doing wrong? Thank you!

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [October 9, 2019, 5:59am UTC](https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692/2 "2019-10-09T05:59:55Z")

</div>

Hi, @rongill100percentbho! 👋

### **Welcome to our Community! 🎉 🎉**

* * *

> [@rongill100percentbho](#):
>
> Is there anything I am doing wrong?

Yep. There are two things you are doing wrong -

- First, you are initializing the variable at **numerical** type.  
And you are treating it as a list - i.e, you are inserting an item in a numerical variable; not in a **list**.
- Second, you are setting the label’s text to a list. Labels can have **text** source only, not list(s).

* * *

So, in order to solve this, you just need to do this - ⬇

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1bfaffc64e29f287b039fa8abbb54ea082095689.png)  
➡ (This will set the label’s text to a number, i.e. 3.) ⬅

* * *

Hope I helped you! 😄  
**Thanks! 😊**

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [October 9, 2019, 7:40am UTC](https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692/3 "2019-10-09T07:40:04Z")

</div>

Hi,

> - Second, you are setting the label’s text to a list. Labels can have **text** source only, not list(s).

You are mistaken, Labels.text may take as a source list and display it on the screen. This is possible due to the fact that the list is converted to a string data type. For this reason, the text property of any component will be output and the number, and logical values ​​without problems.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [October 9, 2019, 10:27am UTC](https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692/4 "2019-10-09T10:27:31Z")

</div>

Hi @rongill100percentbho

Just to expand on Kartik’s point a little:

> [@kartik14](#):
>
> you are initializing the variable at **numerical** type.

I took a quick look and found that this **won’t** work because the `myList` variable is a number and not a list.

 ![07](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e5cc0cfe712df4da992a1719fba6728abc48ecc4.png)

However, something like this **will work** because we’re just adding an extra list item to the end of the list:

 ![20](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/f/1f75eb3291b7cb55afb1b06c7504bddc164df83f.png)

Finally, if you don’t happen to know what the list contents will be you can always use the `empty list` block to create a list that has no contents.

 ![38](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/1/1188c9d3f617156c62a04e2d43c209d947876b8d.png)

---

<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, 12:08pm UTC](https://community.thunkable.com/t/solved-how-do-i-add-items-to-the-beginning-of-a-list/263692/5 "2024-11-08T12:08:46Z")

</div>


