Hello everyone,
I can't figure out why the expired medicine check doesn't work anymore. What am I doing wrong?
Regards
Nicola
Hello everyone,
I can't figure out why the expired medicine check doesn't work anymore. What am I doing wrong?
Regards
Nicola
You call this procedure at the start of Screen1:
The procedure iterates over the global variable Medicine_Dates:
But you did not yet load the global list yet (from TinyDB?)
Mistakes like this are easier to spot if you include those global variables as parameters in your procedure calls.
I followed your advice
but the strange thing is that even though "prova" corresponds to 7/19/2026 and prova2 to 6/19/2026, it tells me that only prova2 has expired.
I don't see why the 7/19/2026 date wasn't caught.
I have only two guesses:
I suggest applying Companion Do Its to hard coded samples of those blocks, to see the intermediate results on your device.
You can also do the other way round ( hey, there is always someone telling to do in the opposite way… this time it’s me ; - ).
I mean, I prefer saving a timestamp (clock.systemtime ), it is a simple number, easier to compare ( without any conversion ).
You only need to convert in a readable form when you need to display it ( use clock.makeinstantfrom millis and then format the instant as you like )
But if label4 sees the two dates, why does it only show me one?![]()
What do you mean outside the for loop?
before the for each loop ( otherwise each time the then is executed the label4 text is overwritten ):
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.