Update values from selected item in data list

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 :

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 :

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 :

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

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 :

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!

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?

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.

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.

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.

Thanks ! I’ll try that.

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…
3: May we have a peek at your Google Sheet?

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