Need some help with variables

Hello Thunkers.
I am working on an app to improve the vocabulary of my students. I have thousands of similar words between English and Spanish, and although with the Data Viewer List I am already progressing, and the app shows and pronounces the words in British English, American English and Spanish, I am stuck with the variables (I suppose) in several aspects, and I have not been able to find examples to draw inspiration from. Let’s imagine that in one session a student learns the first 20 words … In the next session, how can you continue learning vocabulary with the next word where you left off? How could you ask them to write those 20 words they already learned? How would you compare the pronunciation of the students with that of Thunkable?

1 Like

If the words are in sequential order then you only need to save the index or pointer to the last learnt word. If you have a profile for each user then this is where you should save the pointer and retrieve it every time the user starts the app.

If you do not keep a user profile you may resort to stored variables where the variable is saved in the user’s device and as long as the user is running the app from the same device, the app will read the content of the stored variable every time it starts and continue from there.

Hope this helps.


Thaks so much, Muneer. finally, i’m learning a lot.

I am not keeping any user profile… . In the blocks, as you say, I have to add an index and put it in a stored variable, and continue with it in every new start. Do you know any example I can study?

1 Like

Check this app demo.

I’m demonstrating here how to make a multi-language app by using object structures to save the required text.

Once the user select a language, a stored variable is updated so that every time the app opens it automatically displays text in the selected language.

1 Like

It is always a pleasure to be able to count on you. Thanks

1 Like

Sorry but there is a mistake, because this page shows like

1 Like

Sorry, my mistake. I updated the link.

Hi, I have made some changes, but I don’t get what I want. Could you have a look to my blocks and tell me about my mistakes? Thunkable

Yes, my words are in sequential order, and I do not keep any user profile, but I think don’t know how to save the index or pointer to the last learnt word, because any of the things I have been trying works properly… and yes, I should use some stored variable but any of the changes I have made seem to be the one I need. Could anyone help with this, please? Do you know any example?
You can see what I am doing so far here Thunkable

If you’re using a data source to store your words, one per row, then you can just save the row number of the current word into a stored variable each time the word changes and when the app is opened, use that variable’s value to adjust what you show the user.

Some data sources can use row #s as the row id and some require the actual row id (which is a long string like 4e5RFgqsx89pm3n22a).

But you can use the ID field in the list of values block to get those row ids when needed:

Thank you Tatiang,
I am not sure I can do it right, but 'll try. I could use either aitable or the local data source. Do you know any example or could you help me how to do it with the blocks?

I guess a lot of this isn’t working, right?!
no rula|690x185

You can drag an image directly into a post to embed it. No need to upload it elsewhere or post a link to the screenshot. I fixed your post above for you.

When you say “this isn’t working,” what exactly do you mean? What are you expecting to happen and what actually happens when you run that code?

Thanks Tatiang,
I did’t know I could embed the images.
When I run the code, nothing seems to happen, that’s why I say it is not working. I have not been able to find any example of what I want to do, and although it is probably something that could be simple, I have my doubts, because in this field I am a little rookie. Let’s try to solve the first question: Let’s imagine that in one session a student learns the first 20 words … In the next session, how can you continue learning vocabulary with the next word where you left off? I can understand the logic of what you tell me, but I can’t figure out how to assemble the blocks, even though I’ve been trying for many hours.

Your code (blocks) looks correct to me. But if I were to summarize the algorithm, I’d say that it cycles through the list of words in EntireLanguageList3 and if it finds a match with SearchString3, it then adds that word to the end of TempList3.

You’ll notice that nowhere in your code is there anything that would display the results of your efforts.

So when you say “nothing seems to happen,” I would say “then it’s working!” I’m being a little silly but really, if your blocks are working then you shouldn’t notice anything when you preview your project. There’s nothing visual to indicate that it did or did not actually work.

This is a long way of saying that you need to provide some notice of the results. The easiest way to do that is to assign the value of a list item (e.g. item #1) or the entire list (using the make text from list block in the List drawer) to a label. Put that set label's text to block outside of/below your count with i from loop block and then preview again.

What happens when you try that?

1 Like

Here’s a demo that allows you to click “Next” to go to the next word (there are 8 words in the data source currently). If you close the Preview and then re-open it, it remembers which word you were viewing.

1 Like

Thank you so much, Tatiang

Hi Tatiang,

I have been able to verify that your example works perfectly with the Words and Definitions labels but, in the case of a Data Viewer List, what element should I use

in the Function? I’m trying like this, but it doesn’t work for me.


What is it you’re trying to do with those blocks?