Medication Reminder (again)

Yes, but before or after doesn't matter.

I have a question regarding the tags used in my screens. In the medication screen, I use the tags "1, 2, 3, and 4." For the appointments screen, should I use tags like "5, 6, 7, and 8" to prevent overwriting the medication data in the database, or does it not matter? Or is there a better way to store the data than the way I'm doing?

I don't understand. I haven't followed the topic and the entire thread with almost 100 posts. So explain in more detail what it's about and always show the relevant blocks.

I have this screen for the medication reminder where people submit their medications


And I am saving the data like this

Should I be using the numbered tags or change it to something else to prevent problems?

By the way, I need help with something a bit more complicated... I have a List picker with the frequency of the dosage of the medications (Daily, Weekly, Monthly, ...) How can I make whatever the user selects actually impact the notification time?

What about storing all values of an alarm time in a list and store the list in only one tag in TinyDB?

Learn how to work with lists

As already suggested earlier, simplify! Your logic will work only while your app us up and running anyway...

Taifun

Now I created the list for the alarms


what do I have to alter in the blocks to make it save the alarm on the list? I am a bit confused...

And how exactly would I simplify that?

In only 5 min you are not able to learn how to work with lists. . What about start doing the previously mentioned tutorial now?

Also why do you not use the simplified blocks by @Anke ?

Well, you are the app designer...
For example to have only daily alarms
Remember, it is only for a school project...

Taifun

1 Like

It's not just a regular school project, it's the project that will decide if I finish school or not soo I think simplifying is not the option...

Okay! I managed to do something, can you tell me if this is what you meant?


And what do I change in this blocks?

From your latest screenshot it looks like you want to display all alarm times in a listview...

And additionally you like to store the alarm times in TinyDB together with some data like name, description and selection (I'm trying to guess this while looking at your previously provided screenshot)

So what about using your alarm time as tag and storing all data for a specific alarm time as value?

You then could also use the TinyDB.GetTags method to get a list of all stored alarm times to display those in the listview after reopening the app next time

Taifun

The listview was just because I was following a video tutorial but I do plan to add a ListView in an other screen that the person could use to see/update and delete the alarms that she currently has... What I would put on the "Tag" of the TinyDB store Value? Also, Yes, I do want to store the name, description and selection too in the TinyDB.

Another question that I have, I'm doing this thing where it doesn't let the user submit the medication if one of the textboxes are empty, how can I make it check if there is something selected in the spinner?


Would I have to use the "get selection" and use one of the logic components to check if something is selected or not?

What is the selection index of the spinner, if nothing is selected?
Also you could set it to daily as default

Taifun

This all the blocks I have for the spinner.


How could I set daily as the default one? And I think the index of the spinner if nothing is selected is 1 that is related "Close Selection"

And for the tag part.. you are saying that the tag is "get global Alarm List" or the "call clock1 .MakeTime" ?

Well, I think it is important, that you understand your blocks... so what is the alarm tine, what is the AlarmList and what is Clock1.MakeTime? You also can use Do it to find it out if you are unsure ..

Why don't you try to find it out with a simple Do it? Also check Spinner.Selection in that case

Taifun.

I made the "do it" like you told me to... the default option for the spinner is "Close Selection" however I am still unsure of what to put in the TinyDB storevalue tag...

For what I'm understanding, what would make more sense is the "get Global alarmList" since when the save button is pressed, it saves the data there...

So the answer is

If Spinner Selection = "Fechar Seleção"
Then "Please select a value"

You have to think about, what you want to store in TinyDB and how...
You need all alarm times and the details of each alarm time... I made a suggestion earlier

It is your app.. you can store your data as you think, you should store it... just try something, and if it does not work, try something else and learn from the errors...

Taifun

1 Like

I want to make another screen with a listview where it shows every medication the user has saved, Is something like this possible?

I really really really need help for this project, the deadline is almost coming and I need my app fully functioning... that's why I'm asking a lot of questions and questioning simple things...