# Update values from selected item in data list

**URL:** <https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963>\
**Category:** Questions about Thunkable X\
**Tags:** help\
**Created:** [November 7, 2023, 12:13pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963 "2023-11-07T12:13:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernardeau.clement3d](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bernardeau.clement3d](https://community.thunkable.com/u/bernardeau.clement3d)\
**Post date:** [November 7, 2023, 12:13pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/1 "2023-11-07T12:13:17Z")

</div>

Hi everyone,

I need a little help with the app I’m creating.  
I’m building an app to easily create names for audio recordings I make in the field. They are displayed like this in a data list :  
ABCYYMMDDT001  
ABCYYMMDDT002  
ABCYYMMDDT003  
ABCYYMMDDT004  
…

I sometimes create a name by mistake, and need to delete one take (by selecting an item in the list, and push a “delete” button). If in this exemple I delete take 2, I end up with this :  
ABCYYMMDDT001  
ABCYYMMDDT003  
ABCYYMMDDT004  
…

I’d like to automatically update the values so T003 become T002, T004 become T003 etc…

So far I managed to update the takes numbers with this :

 ![TakeChangeBlocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/d/1d4087ec2e333c3548b92e97abc5fc80b3a5aedd.png)

But obviously, it updates every rows so in the previous exemple I end up with :  
ABCYYMMDDT000  
ABCYYMMDDT002  
ABCYYMMDDT003  
…

So my question is : is there a way to update rows, only from the selected item, and leave the above items as it is?

For another task in my app, I managed to get the number of the selected row, and not his ID with this :

 ![Index number](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/9/49cbf83c2b5de949282a73610d7e1e6e3e58d72d.png)  
But I don’t know if this could help in this case.

Does somenone has any idea on how to manage this?

Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![tthompson41231](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tthompson41231/32/161401_2.png) [@tthompson41231](https://community.thunkable.com/u/tthompson41231)\
**Post date:** [November 8, 2023, 2:23pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/2 "2023-11-08T14:23:13Z")

</div>

It might be a little slow to re-number it in a stored database if there is a bunch of items. Does it need to be stored in a database? What other information are you saving in there?

---

<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:** [November 8, 2023, 3:44pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/3 "2023-11-08T15:44:52Z")

</div>

I would not do this in Thunkable. I would write a Google Sheet formula to append numbers in order to “ABCYYMMDDT”. That way, if you add or delete a row, the values are automatically updated and you get access them from Thunkable.

---

<div class="post-metadata">

**Author:** ![bernardeau.clement3d](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bernardeau.clement3d](https://community.thunkable.com/u/bernardeau.clement3d)\
**Post date:** [November 8, 2023, 5:29pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/4 "2023-11-08T17:29:52Z")

</div>

Hi, tthompson41231, and thanks for answering.  
I need to store the datas on a google sheet so I can access them later to rename the audio files I recorded. And also I need to store it in a database because when I’m out in the field, I don’t always have network and need to store the data locally and send it later to the google sheet.

Hi tatiang. Good idea, I didn’t think about that. In my case the ABCYYMMDDT was for the exemple, but in reality ABC is a code different for every project, YYMMDD is the date (today 231108), and T001 T002… is the take number. And this is just the begining of the name, after that I have description, hour, mics used etc… so the data looks more like this : AQA23117T001 - birds - wind - cars - 13h40 - 96.32 - ORTF  
AQA23117T002 - walking - city noise - 13h54 - 96.32 - MS  
AQA23117T003 - river - boat passing - 14h30 - 96.32 - ORTF+ab  
…

So maybe this isn’t the right place to ask, but how would you change only the T00n part when a row is deleted in a google sheet?

Thanks again both of you for answering.

---

<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:** [November 8, 2023, 8:20pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/5 "2023-11-08T20:20:25Z")

</div>

In Google Sheets, you can use a combination of text functions such as “mid”, “left”, “right” and “find”.

You could probably ask ChatGPT to create a function for your sample data.

---

<div class="post-metadata">

**Author:** ![bernardeau.clement3d](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bernardeau.clement3d](https://community.thunkable.com/u/bernardeau.clement3d)\
**Post date:** [November 8, 2023, 8:46pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/6 "2023-11-08T20:46:07Z")

</div>

Thanks ! I’ll try that.

---

<div class="post-metadata">

**Author:** ![tthompson41231](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tthompson41231/32/161401_2.png) [@tthompson41231](https://community.thunkable.com/u/tthompson41231)\
**Post date:** [November 8, 2023, 9:33pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/7 "2023-11-08T21:33:14Z")

</div>

1: Do all your projects follow the same starting format?  
i.e. (3 letter project name) +(date)+(take)  
2: Does each new project start from T001? If so then you only need to update  
each projects values and not the entire spreadsheet.  
i.e. ABCT001…  
ABCT002…  
defT001…  
defT002…  
3: May we have a peek at your Google Sheet?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [February 6, 2024, 9:33pm UTC](https://community.thunkable.com/t/update-values-from-selected-item-in-data-list/2686963/8 "2024-02-06T21:33:36Z")

</div>

Closed on February 6, 2024, 9:33pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
