# Saving New Data(add new row fn) in Local DB

**URL:** <https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844>\
**Category:** Questions about Thunkable X\
**Created:** [September 14, 2020, 5:09pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844 "2020-09-14T17:09:27Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 14, 2020, 5:09pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/1 "2020-09-14T17:09:27Z")

</div>

Dear Thunkers,

Am trying to add a new row to my thunkable local db by use of text input . However after adding the data when I open the DB the data has not been added…  
I have followed previous similar topics but did not seem to find a solution.  
Local DB is really important for my quiz app since it’s designed to work offline.  
Any help offered will be highly appreciated

---

<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:** [September 14, 2020, 5:47pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/2 "2020-09-14T17:47:56Z")

</div>

I remember there was some problem with this, but then it was solved, as far as I remember.

Display the value of all blocks on the screen to understand the problem.

Are you sure that the add row function is called? If this is the case, does the number of rows in local DB change after this?

---

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 14, 2020, 6:03pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/3 "2020-09-14T18:03:14Z")

</div>

The function is called and in fact I added a function to search and display the contents of the table sequentially and it shows the new data as the last one , but funny thing is that it doesn’t save the data.  
I will share the blocks shortly

---

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 14, 2020, 6:19pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/4 "2020-09-14T18:19:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 14, 2020, 6:23pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/5 "2020-09-14T18:23:14Z")

</div>

![Screenshot_2020-09-14-21-18-21-05](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f6869738ed8811223e44b60afc0b9982ee64154.jpeg)

---

<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:** [September 15, 2020, 5:25am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/6 "2020-09-15T05:25:40Z")

</div>

I think you wrote the question incorrectly. Local DB does not store data on disk between executions of the application. Why did you decide that this component should save data when you reopen the app?

---

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 15, 2020, 5:41am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/7 "2020-09-15T05:41:44Z")

</div>

I agree with you fully,  
So, is there a work around where I can add new data to the local db and be able to access it next time or is there no way to save data offline in xthunkable.  
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:** [September 15, 2020, 5:42am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/8 "2020-09-15T05:42:42Z")

</div>

Use stored variables

---

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 15, 2020, 5:45am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/9 "2020-09-15T05:45:35Z")

</div>

Ok , thats workable, but the kind of data am trying to save is of high volume…hundreds of rows of quiz questions. Will it be efficient to use variables for this task?

---

<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:** [September 15, 2020, 5:50am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/10 "2020-09-15T05:50:10Z")

</div>

There is no concept of a local database in Thunkable X. However, you can store any data structures (simple values, lists, object lists, JSON, trees, stacks, and more) in the stored variable. The efficiency of working with data will depend not on the variable, but on the data structure you choose and the algorithm for working with it.

Unfortunately, blocks have a limit on the size of the data they can work with. If the amount of data exceeds 1 Megabyte, you may encounter problems when working with such a piece of data.

---

<div class="post-metadata">

**Author:** ![general](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@general](https://community.thunkable.com/u/general)\
**Post date:** [September 15, 2020, 6:07am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/11 "2020-09-15T06:07:44Z")

</div>

Thank you for this insight, I will experiment on this. I will leave this thread open for the meantime and if no new comments or contributions from others I will mark it as solved.  
Thank you for your input.

---

<div class="post-metadata">

**Author:** ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)\
**Post date:** [October 15, 2020, 4:14am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/12 "2020-10-15T04:14:31Z")

</div>

actech,

just to ask, use store variable in local db or just use store variable?

---

<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 15, 2020, 5:57am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/13 "2020-10-15T05:57:03Z")

</div>

> just to ask, use store variable in local db or just use store variable?

Use stored variable - ![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/8/f8eaa7031ea4f576dece6d9bbec439dcf2735fca.png) this select “stored”

---

<div class="post-metadata">

**Author:** ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)\
**Post date:** [October 17, 2020, 3:18am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/14 "2020-10-17T03:18:09Z")

</div>

why i am getting vertical in list view?

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/45a2e1322d512489757670b0ed3719686ba0e176.png)

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

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

---

<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 17, 2020, 7:35am UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/15 "2020-10-17T07:35:04Z")

</div>

What did you expect to get? The result depends on the blocks used.

---

<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:22pm UTC](https://community.thunkable.com/t/saving-new-data-add-new-row-fn-in-local-db/816844/16 "2024-11-08T12:22:03Z")

</div>


