You could try to use the webviewer and an html file for this kind of task. There is no way to assign a text value from a text file at this time based on a recent conversation about access root files.
I’ve done this before and it’s pretty simple!
All you have to do is have somewhere public where to host information like github. Upload your txt file and use the web API component.
What you have is a long sting of your data. So I would put certain things in your text to get like an ID and the value.
Thank you for your help, it looks indeed promising but it says it just works on iOs and not with Android. I really need something it can be used in both of them
I have been trying to figure out how to upload text into Thunkable. Do you have any links/examples of the GitHub Web API to either download or upload a file? That would be HUGE for my project.
Sure, it’s not actually like uploading is like retrieving from the web. If you want to upload contents as a txt file then you would need a custom API to save that data and save it to a database like airtable or sheets (taking in consideration the character limits)
To just retrieve data:
You make a txt file in Github To just use github to retreive data. I use it to have multiple languages and add more as I develop the app.
The raw link you get from github that’s your ‘new’ txt file.
@drted I just tried it out myself and got it to work. I thought I was going to access the text file as a JSON object but I ended up just pulling the text and parsing it by newlines as a list.
I pasted the text file contents into GitHub but there’s probably a way to upload a text file directly. Here’s a link to that text in GitHub:
And the sample project that pulls the 5th line from the text file (“was”):
Edit: And I was able to find the upload button and upload a different text file. If you open the sample project from the project link above and change the url to https://raw.githubusercontent.com/tatiang/datasources/main/typing.txt, you’ll get the 5th word/line of that text file, “jumps”.