How do you read listview selection?

  1. Here is where i don't know how to retrieve the text in the element that the user selects.

when the user clicks an item in the listview it should extract what the text of that item
is and transfer to screen one

2.unfineshed code

Did you see the image on TinyDB.GetValue?
You can not call this function when initializing a variable.
Call this in the Screen.Initiaze event.

it has been fine like this, so its problably just a glitch in MIT.
And you've seen my code, and don't want to complicate it more.

It is not a glitch, that red alert says you are constructing the code wrongly. Initialize the global variable with create empty list then in screen initialize set the global variable with tinydy value as said by @Kevinkun

Also check up in list view blocks where you can see get listview selection 2which will give you the selected value text

i will try the selection block, and will see if calling the tinyDB get value in an event handler improves anything.

image

The first returns the main text of the selected item.

The second returns the detail text if it exists.

The third returns the index of the selected item.

ok, with that problem solved, i was able to do some testing, and found that the list kept
adding the same item to the list over and over again.

1.not sure what to put here, but i want it to be something that represents index one and goes up for each item in the list, that way every item will be checked and won't be added twice.

and also thanks for the last problem.

why use a for each loop?

i recall from the dupe post you requested info, and i changed the code, mostly tags.
Here it is.

1.screen1
2.screen2
3.screen3
4.screen4

image

i used a for each item to compare each item to hopefully prevent multiple items
appearing on the same list.

image
it keeps bringing this up, and i cannot locate anything that says
image. if you can locate anything i would be glad.




You need to ensure that all your labels and tinydb tag values contain valid values on Screen Initialise...e.g that they are not empty/blank, or in some cases = 0.

i checked everything but nothing was empty that i saw

upload your aia file.

turns out that there was a text label that was hidden behind other blocks.
now i am having trouble keeping progress, so i have two labels, and the
way i store is in steps below.
1.it joins the name and the progress for a tag
2.it stores the progress
3.it joins the name and the progress for a tag again
4.it should set the label to its previous progress

You can't global init values from TinyDB.
Load them in Screen1.Initialize.

Can anyone recommend a tutorial to read or watch to help me better understand saving data to a list item.

I would like to save 2 numbers to a project and load those 2 numbers back into screen 1 when the project is selected. It feels like I'm almost there but I'm missing something.

This is my first time coding anything so I appreciate all of the help with this!

I have also uploaded my .aia file.

Working_Gcc_copy_backup013125_copy.aia (31.0 KB)