# Stored variables

**URL:** <https://community.thunkable.com/t/stored-variables/51652>\
**Category:** Questions about Thunkable X\
**Created:** [October 12, 2018, 11:23pm UTC](https://community.thunkable.com/t/stored-variables/51652 "2018-10-12T23:23:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 12, 2018, 11:23pm UTC](https://community.thunkable.com/t/stored-variables/51652/1 "2018-10-12T23:23:06Z")

</div>

I love the stored/cloud variables-- it something I’ve been pushing for a long time and have talked with Mark about. I think it can be a game changer for beginners and building apps with persistence and shared data.

I started playing around and am having trouble with building a simple noteTaker app. I have defined stored noteList but when I try to insert an element it crashes (well, the op doesn’t work). I tried first setting the stored noteList to empty list, but that didn’t work either.

Are there any samples, especially with list data?

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 12, 2018, 11:34pm UTC](https://community.thunkable.com/t/stored-variables/51652/2 "2018-10-12T23:34:02Z")

</div>

I played around some more, I think the insert at is not working with stored variables. I was able to create a list with the list block, and its stored persistently, but I can’t add items to the list

---

<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 12, 2018, 11:35pm UTC](https://community.thunkable.com/t/stored-variables/51652/3 "2018-10-12T23:35:05Z")

</div>

I am still using the variable created with the procedures for list items

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 13, 2018, 12:04am UTC](https://community.thunkable.com/t/stored-variables/51652/4 "2018-10-13T00:04:26Z")

</div>

Hi and thanks. What do you mean by “the variable created with the procedures for list items”?

---

<div class="post-metadata">

**Author:** ![Kyle\_Williams](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@Kyle\_Williams](https://community.thunkable.com/u/Kyle_Williams)\
**Post date:** [October 13, 2018, 12:18am UTC](https://community.thunkable.com/t/stored-variables/51652/5 "2018-10-13T00:18:06Z")

</div>

Sorry you are having issues but I am glad to hear that I am not the only one having this problem. I can’t seem to modify any list stored in a variable. That includes adding, removing, or modifying any list item.

@Mark Are you aware of this issue?

---

<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 13, 2018, 12:22am UTC](https://community.thunkable.com/t/stored-variables/51652/6 "2018-10-13T00:22:15Z")

</div>

> [@David\_Wolber](#):
>
> I played around some more, I think the insert at is not working with stored variables. I was able to create a list with the list block, and its stored persistently, but I can’t add items to the list

Sorry, Dave. That’s a known issue. See [this post](http://community.thunkable.com/t/october-10-launching-the-thunkable-gallery-thunkable-pro/51334/8) and some of the following ones for more details from Paul.

-Mark

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 13, 2018, 12:25am UTC](https://community.thunkable.com/t/stored-variables/51652/7 "2018-10-13T00:25:33Z")

</div>

Hi Mark. Good to know, thanks,

Dave

---

<div class="post-metadata">

**Author:** ![User81](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@User81](https://community.thunkable.com/u/User81)\
**Post date:** [October 13, 2018, 3:37am UTC](https://community.thunkable.com/t/stored-variables/51652/8 "2018-10-13T03:37:21Z")

</div>

> [@David\_Wolber](#):
>
> Hi and thanks. What do you mean by “the variable created with the procedures for list items”?

@AcrobatEpee means this:

 ![listsbug](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/688fdcc0131654237eba777a0890aaf130d3da79.png)

The two upper purple and orange blocks show the solution. To create more variables please click on the gear-symbol in the upper left of the purple block.

 ![listbug2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b1ae1dae50e748ee0889fa7220e83bb122fd9366.png)

---

<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 13, 2018, 9:54am UTC](https://community.thunkable.com/t/stored-variables/51652/9 "2018-10-13T09:54:24Z")

</div>

Yes, @User81 has exactly what I said ! The time I figure out how to use the new variables, that’s how I am doing it 🙂

Thanks and sorry for the delay 🙂

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 14, 2018, 4:02pm UTC](https://community.thunkable.com/t/stored-variables/51652/10 "2018-10-14T16:02:47Z")

</div>

thanks, much appreciated,

Dave

---

<div class="post-metadata">

**Author:** ![Franz\_Jonshon](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Franz\_Jonshon](https://community.thunkable.com/u/Franz_Jonshon)\
**Post date:** [October 17, 2018, 4:16am UTC](https://community.thunkable.com/t/stored-variables/51652/11 "2018-10-17T04:16:44Z")

</div>

Seems like insert at , is not working properly, in other post i read , the Block Need to be inside a loop to work

---

<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 17, 2018, 9:17am UTC](https://community.thunkable.com/t/stored-variables/51652/12 "2018-10-17T09:17:10Z")

</div>

What do you need ? I failed to understand sorry 😕

---

<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 23, 2018, 5:16pm UTC](https://community.thunkable.com/t/stored-variables/51652/13 "2018-10-23T17:16:01Z")

</div>

The current issue has to do with the way that we store the new types of variables. We aren’t properly storing modified lists (or objects). We have an imminent release that will fix the issue in the majority of cases and are working on a complete fix that will be rolled out soon after.

-Mark

---

<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 23, 2018, 9:54pm UTC](https://community.thunkable.com/t/stored-variables/51652/14 "2018-10-23T21:54:22Z")

</div>

> [@Fix for issues with variables, lists and objects](http://community.thunkable.com/t/fix-for-issues-with-variables-lists-and-objects/53368):
>
> We’ve re-deployed the fix described below after having fixed an issue that we originally discovered with it The just-now-deployed version of Thunkable ✕ fixes most of the issues that people have been having with variables, lists and objects. Note that in order to have the fix take effect you will need to force quit and restart our Thunkable Live app, as well as refresh the browser page where you are running [x.thunkable.com](http://x.thunkable.com). There will still be a (hopefully) small number of apps with issues. …

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 25, 2018, 12:45am UTC](https://community.thunkable.com/t/stored-variables/51652/15 "2018-10-25T00:45:06Z")

</div>

Great, this is fantastic.

How do you initialize, say, a stored variable, to be defined as a list?

One way is to first run the app and set the stored variable to empty list. Then modify the blocks of the app to expect a list in the Screen.Starts.

I’d check to see if the stored variable is a list, but I dont think there is a way to ask if a variable is a list. And I can’t insert things into a variable unless it is a list.

Thanks,

Dave

---

<div class="post-metadata">

**Author:** ![paulmw](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@paulmw](https://community.thunkable.com/u/paulmw)\
**Post date:** [October 25, 2018, 1:11am UTC](https://community.thunkable.com/t/stored-variables/51652/16 "2018-10-25T01:11:53Z")

</div>

To initialize a stored variable as a list, I’d set the stored variable to an empty list if it’s null when the app starts.

Unfortunately, we don’t have a block to tell if a variable is a list.

---

<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 25, 2018, 6:48am UTC](https://community.thunkable.com/t/stored-variables/51652/17 "2018-10-25T06:48:06Z")

</div>

In Thunkable X, you can define the value type of any variable. For the list, use such a block.

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa243b2cc4e68a720d9c9fe544c1d5a5505d1c3e.png)

An empty list is , an empty object {}, a non-empty object contains { and }, an object in the string representation [object Object], not a number - NaN, etc.

If the brackets can be used inside the values, then the definition condition of the list needs to be clarified - the first character = [and the last character =]

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [October 25, 2018, 5:08pm UTC](https://community.thunkable.com/t/stored-variables/51652/18 "2018-10-25T17:08:31Z")

</div>

![55%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec788eaf7c852b76885f069acd268de23c3ff847.png)

Hi Paul. I tried the code attached and can’t get the “notelist=null” to evaluate to true.  
I also tried "notelist=“null” because there has been a bug with LocalStorage such that that  
would work, but that didn’t work either.

Thanks,

Dave

---

<div class="post-metadata">

**Author:** ![paulmw](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@paulmw](https://community.thunkable.com/u/paulmw)\
**Post date:** [October 25, 2018, 6:15pm UTC](https://community.thunkable.com/t/stored-variables/51652/19 "2018-10-25T18:15:05Z")

</div>

Try force quitting your Thunkable Live app and re-opening it. We pushed an update to the app that requires a force quit to apply ~48 hours ago.

I just tested your code on my up-to-date devices and it works for me (and it didn’t work on a device on the previous version).

---

<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 25, 2018, 7:11pm UTC](https://community.thunkable.com/t/stored-variables/51652/20 "2018-10-25T19:11:53Z")

</div>

Hi,

The “null” block has usage specifics and does not work as many people think. Try a text comparison instead:

if join \<- stored Notelist = “null”

Although the comparison with the null block should work.

[Next page](https://community.thunkable.com/t/stored-variables/51652.md?page=2)
