I am struggling with an idea that’s for me feels quit advanced… But maybe it’s not if you know what to do🙂
I am wondering if you guys could help me out with any tips?
So, I have now built an app which works like this:
Its an app where I can enter the days that I have NOT been at office.
It starts with a simple DVL list where I can add new data to it.
I have made that the items/data in this DVL also are mirrored in a variable just to be ably to use later if I would need to. This variable is called “myList”.
When I have filled the list for one year I would like to save this list somewhere so that I can go back to it (as a user and read only) if I’d d like to. This is set up and works fine, I am just read the data from this variable “myList” and put it in a List Viewer on another screen. Works great!
BUT, the problem is that, for now, this list will always be what’s in my DVL. So if I save this list and call it ex 2021, I will then see this data in my ListViewer, but for next year, I will reset the DVL (and therefore also my “myList”-variable), and next time I save the DVL list for 2022, my previous saved list (2021) will now show the data for 2022 as, I am just mirror the DVL in my variable.
I hope I make my self clear in my issue.
I am wondering how I could save my list (DVL/variable) for ex 2021, and then be able to start all over but my data in that saved list for 2021 are not effected by new entries for 2022.
It’s like I would wanna “copy” my DVLs data, and “paste” it in a new list viewer/variable as a new separate list for every time I save my DVL at the end of a year.
maybe the solution is silly but I am just missing it for some reason, or it is not even possible?
Thanks for any ideas.
You can save your list in Firebase under a key such as the year (2021). You will have a separate list for each key.
You can save the list in a Google sheet or Airtable by adding extra column with the year. You will have each list with the year repeated for each row and therefore you can easily retrieve them when needed.
You can create a text from the list and send it by email.
You can create a text from the list and share it with any other app such as WhatsApp or Telegram.
You can create a CSV file from it and save it to your phone. I made a demo app to save contact info which you can use the same and build it for CSV.
You can show it to the user as text and ask the user to copy and past it to any kind of “notes” app for later use.
I could go on and on with other ideas but hopefully you got what I mean.
Thanks Muneer.
I am still struggling with this. I thought that your idea with Firebase was kind of what I was looking for, but I thought I could do it even more basic by using the LocalStorage in Thunkable. That way I could save my list under a key which could be my textInput (ex 2021).
I thought that maybe that could work, but I feel very confused in how to set that up.
could you give me some guidance?
Here’s a link with a video of how the app is working at the moment.
And this is the block for saving this “year” at the moment:
This is when I click the “entry” in the alert-message:
And I am simply view that list in another screen with this block:
I have tried this block to save the list within a specific year: (this and many other methods)
But as you understand I am not thinking straight in this…but at least maybe you will understand my idea? I thought I could add the TextInput text in a variable and use that as a key and save the current DVL in that key. And later I could call on that key and view that saved list from within that key.
It’s very hard to try to explain an idea that is not using the conventional way of using lists therefore I built a starter app to demonstrate the idea.
You can enter items in the list and then choose to save it as current list or as a list with the title of your choice.
The first input is for the data entry and the second input is for the list title.
You can then use the Load List button to either load current list or the list name you type in the second input.
Hi
Muneer, Thanks again for your ideas and support!
Even though I didn’t follow your ideas exactly I got inspired and somehow I got it working at last…
These are my blocks now:
For saving a list as an item named after the textfield:
The screen that will show this selected years list simply do this:
I do have one concern though.
This works great inside thunkables “LiveTest”-feature. But when I want to view it through my Iphone 6s the app crashes when do that first block (For saving a list as an item named after the textfield in a list)
Ok thanks, so, just to clarify, you have not added or changed anything in the code here? Except for that label showing the result?
And you are using iPhone 7?
Really weird, I will try to download it and install and see if it will behave any different then.
And you can not see anything weird in the blocks that could be causing this behaviour?
I was planning to add some if-statements just to make sure I am not saving empty strings or get errors on the way, but first I’d like to know that the app is working as suspected…
Could this be a bug in Thunkable only for iPhone 6s’s? Should I report it somewhere?
Actually, I tested it on both Android and iOS and found that it crashed in both so I added the label and a wait block to see at what stage the app crashes and found that it fixed itself.
All what you need is to add a wait block inside the first save block and before the second save block which is inside the first one and it will work fine.
Hm…
It seam to be something with the year variable…
If I change variable To something else and don’t navigate to another screen the app won’t crash, it won’t do what I want either of course but that could be a sign that something is not right with that variable. Could it be what you said, that I do not check for any duplicates? Could that make the app crash?
I did more test and found out that the problem is in the Screen Opens block.
You are trying to get the content of the year and the problem is that the Local Storage will send a TEXT of null if the key has no data. This will force your variable to change from list to text and when you try to add the entered year to the list variable in the “save button” the app will crash.
I was able to fix the situation be this change.
You don’t need a wait block. This is a mistake from my side.