Medication Reminder (again)

The better way I explained earlier... here the suggestion again, now the 4th time

The value you are storing in TinyDB is a string
The Elenents property expects a list, therefore the error
You can use the ElementsFromString to not get the error...
but like this you can display only one alarm time in your listview... this is not what you need...
If you want to display several alarm times in your listview, then you should have somewhere a list of all those alarm times... my suggestion earlier could do it...
Taifun

But I didn't understand how to follow your suggestion that's why I was asking for the blocks, I don't know how to solve the data like you told me to, I already tried something but it still didn't work...

Show us what you tried based on my suggestion
Taifun

I have this for now, I don't know if it is correct or not.

Is the global AlarmList a list?

Tell us the difference between a tag and a value in TinyDB.

By the way, a surprisingly many people are color blind.
Are you?

A tag is something to identify and the value is the thing identified by the tag?
And yes, the global AlarmList is a List that I want to use to store the Alarms...
And no, I'm not colorblind.

What you have is the list of all alarms as tag and a specific alarm time as value

The suggestion was

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

With my suggestion you do not need to store your list anymore, because you can get it always by using TinyDB.GetTags

As value you store a list of all data relevant to that alarm time, i e.

Are you meanwhile familiar with working with lists?

Taifun

You are still in the early stages of your project but the due date is 9 of July...

Let me again suggest you to reduce your expectations and simplify your project. You ran out of time.

Have only a daily medication reminder for 1 medicament and get that reminder running correctly instead of having an unfinished non working project in the end.

Good luck!

Taifun

1 Like


Soo... Something along this lines?

Well no
You are putting blocks randomly together

You did not understand the concept of storing things and later getting it back, it looks like you are trying both at the same time

Forget my suggestion of storing the data... time is running out... focus on this

Taifun

I think I understood it now..

Unfortunately not

Taifun

At this point can you show me the blocks? I really need this working.. at least this part.

I'm not at my computer, I'm on mobile, so I can't provide blocks

Taifun

I still don't quite understand what you mean by that, I can wait until you are at your computer, don't worry!

Do you know how to create a list and put 3 items inside? No? Then do the list tutorial

And if you got it, then store that list as value

unknown

The tag is your alarm time as you already have it in your latest screenshot

Taifun

and the value to store is the name, description and FormateDateTime instant, correct?

And if I store the values in the list, then I don't have to save them here, right?

What is FormatDareTime instant? Isn't that your alarm time?

Does it make sense to store the alarm time twice? As tag and again as one of the items in your value list? Didn't you say yourself earlier, what you want to store?

Yes, if you do it correctly
Up to now you have not been able to show us a screenshot of storing your list correctly

Taifun
PS

I hope now it's correct.