# Cannot save on tag "1" after deleting this tag from list

**URL:** https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377
**Category:** Questions about Thunkable X
**Created:** [June 13, 2018, 2:06am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377 "2018-06-13T02:06:43Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 2:06am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/1 "2018-06-13T02:06:43Z")

</div>

Hi people, i’m having a problem and cannot solve myself ☹ in my app i make a list of saved data, they are listed in labels and tags , so if i save first time, this data go to tag “1”, if a save again, the data go to “2”, and so on…but when i delete the first tag (tag “1”) i cannot save again in this label, they save on the tag “3” and leave the tag “1” empty, how i can save again in tag “1” if i have a data already saved on tag “2”?

I hope you guys understand, is hard to explain and i don’t find similar example in YT

 ![screen1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce4b346164c809008e3e28edd50048552fe20d84.jpg) ![screen2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/b/bb67ec8f3cbc01eeefec115e76a27c1b75ace737.jpg)

---

<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: [June 13, 2018, 3:40am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/2 "2018-06-13T03:40:09Z")

</div>

Hi,

To “Initialize” block add Tiny\_DB1.Clear All.

If you want to write data to the number that it had after deleting the Tag, then you have the wrong algorithm. Tag number is assigned based on the total number of Tags in the list. If Tags.length = 10, then after removing Tag with number 1 the next Tag will have the number 9 and will overwrite the information in it.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 4:40am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/3 "2018-06-13T04:40:17Z")

</div>

I just don’t wanna leave a blank space on the first “labels” where i save the first tag, the number of the tag itself doesn’t make difference for me.

Maybe is better to remove the item from list?..how can i do that?..i tried and failed ☹

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 4:44am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/4 "2018-06-13T04:44:55Z")

</div>

If i use “clear all” they worked, i’m able to save again on this “tag”, but i have to lose all the saved data in the others tag to.

If i clear the tag “1” and “2” individually, then i’m able to saved again on the first tag.

---

<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: [June 13, 2018, 4:49am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/5 "2018-06-13T04:49:22Z")

</div>

Sorry, I did not express myself clearly. You need to clear tags only the first time to be sure that there is no garbage in the Tiny\_DB. After this delete block Clear All from project.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 4:57am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/6 "2018-06-13T04:57:45Z")

</div>

I’ll try to explain my whole project, maybe is more easy with the whole scenario:

I’m making a scale with 4 load cells in arduino, then by bluetooth i send the data to my app, this part is complete, but i wanna be able to save the “sessions” on a list with a length of about 20 “saved sessions”, this saved sessions opens in another screen, i tried listpick and listview, but they show all the data together on the same line, and the way i show here i can show the data on labels.

So, what’s the better way to store this saved data on labels?

PS: This blocks posted here is only a test, with only two textbox to colect the data to save.

Edit: I’m trying to copy this:

 ![App%20Balan%C3%A7a](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/d/1df5f4810a7b1f814016a73bc37579cdce73d681.jpg)

---

<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: [June 13, 2018, 5:06am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/7 "2018-06-13T05:06:05Z")

</div>

Use a delimited string for this. You write to the first line of the session and after the end of the recording, add a unique separator character to the end of the line, for example #. After that, you add the next session to the line and at the end add a delimiter #. After writing the last session, delete the last character in line #. You will get:

session data 1 # session data 2 # … #session data 20

After that, you can break this line into a list by the symbol #. Do you understand such an algorithm?

4 cells = 1 session? If so, then your data string will be: cell1, cell2, cell3, cell4 # cell1, cell2, cell3, cell4 # cell1, cell2, cell3, cell4, etc.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 5:09am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/8 "2018-06-13T05:09:47Z")

</div>

To be honest i’m noob on this algorithm, but if this is the easy way, i will search for this.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 5:12am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/9 "2018-06-13T05:12:41Z")

</div>

Yes, four cells in 1 session, and there’s more, there’s some math to calculate % and weigth of only 2 cells, 4 cells… will be about 12 data to list in one session.

---

<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: [June 13, 2018, 5:13am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/10 "2018-06-13T05:13:57Z")

</div>

This is a list of lists (or a two-dimensional array. To get a session you have to get the session element from the external list, and to get the value of the cell in it, get a cell from the session item.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 5:16am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/11 "2018-06-13T05:16:06Z")

</div>

I get it!..a list of the sessions, and inside every item of the list, a list of the data, right?

In advance, thanks for your help!

---

<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: [June 13, 2018, 5:17am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/12 "2018-06-13T05:17:09Z")

</div>

Yes! But you get these lists from one data text line - it’s that much easier.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 5:20am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/13 "2018-06-13T05:20:04Z")

</div>

This way i can use listpicker to chose the sessions?

I’ll try this tomorrow, is 2am here and my head is almost exploding from all this informations LOL.

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: [June 13, 2018, 5:21am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/14 "2018-06-13T05:21:51Z")

</div>

Yes. If you have any questions, ask me. And I will do for you a block with an example in this topic.

---

<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: [June 13, 2018, 5:46am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/15 "2018-06-13T05:46:59Z")

</div>

Text in block data = `value1,value2,value3,value4\nvalue5,value6,value7,value8\nvalue9,value10,value11,value12\nvalue13,value14,value15,value16`

 ![sessions](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/68b174f410773df6de1d58241cc1c644ed4e6dac.png)

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 1:47pm UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/16 "2018-06-13T13:47:49Z")

</div>

Thank you very much!..i’ll try today, i’m machinist, so this projects is in my spare time 😃

---

<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: [June 13, 2018, 5:07pm UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/17 "2018-06-13T17:07:48Z")

</div>

Good! I also worked a little with Arduino for Android.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 13, 2018, 7:42pm UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/18 "2018-06-13T19:42:29Z")

</div>

I copy this block to my project, but i don’t get how i input the data from arduino…you said to get the data in this form: ( value1,value2,value3…) directly from arduino?

I’m using the labels and textbox to display the data on the screen1, and do all the math on the app.

---

<div class="post-metadata">

### Author: ![Glaucius\_Borba](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@Glaucius\_Borba](https://community.thunkable.com/u/Glaucius_Borba)
#### Post date: [June 14, 2018, 2:44am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/19 "2018-06-14T02:44:26Z")

</div>

I tried someting today and worked!..i’m now saving on file component, i don’t have that problem and i can save with the file name and retrieve using this file name, i just want to make one more thing to be complete, if possible, i wanna to add a listview or listpicker to show the saved files, but just show the “name file”, not the data on the file, is possible?

Thanks again for all the help! 😃

 ![Test%20app](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/eeeb13f54a0d88597402d7d72ff776d9b784862d.jpg)

---

<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: [June 14, 2018, 6:06am UTC](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377/20 "2018-06-14T06:06:30Z")

</div>

I gave the format value1, value2, etc. as an example. It’s good that you made your format and everything works!

To display file names in the List Picker, you need to get these names from the directory in which they are stored. You can do this using the File extension:

[https://puravidaapps.com/file.php](https://puravidaapps.com/file.php)

[Next page](https://community.thunkable.com/t/cannot-save-on-tag-1-after-deleting-this-tag-from-list/31377.md?page=2)
