Hello. Sorry for another question. I am trying to import elements from a tinydb into listview. As I import the elements I would like to check the saved end date and generate an appropriate image icon next to the main text header. Here is what I have. The first group loads and populates the list properly. The expired procedure checks the date and assigns the image. When I go to run it the first item in the list has a green icon and all the other items have a red icon no mater what the experation date is.
This is because you are iterating over the entire list each time.
To set the desired image, use the "result procedure" (which will contain something similar to your expired procedure) in the imageName socket to set the desired image when you create each list item.
Hi. Thank you. I see the result procedure but I am not sure how I would implement it. Forgive me this is my first app using app inventor. When you have some time may I please see how the blocks should be?
Hi. thanks for the block illustration. What I need to do is find all the dates ending within 5 days from todays date and put a yellow icon next to the title in the list. Dates which expired put a red icon. I have tried to modify the setimage procedure but I get an error
Argument to MakeInstant should have form MM/dd/YYYY hh:mm:ss, or MM/dd/YYYY or hh:mm
I need to use the duration block from the clock to find the number of days between todays date and the end date from the database for each item.