Hello everyone, each element I add to the listview has numerical values, and I want to print these values on labels according to the element I selected, but I cannot print the values after the first label. Where am I doing wrong? How can I print the element information I have selected in the listview to different labels? I cant write listview datas to my other labels, i can take listview datas to only one label., i cant take them to other labels. I searched and i red a lot of topic but i cant find my problems solve. İ will add my apps and blocks screen caps here. Whats my wrong ant solve? Thanks.
Hi .
1- maddeler is a text and you initialize like a list
2- if you work with number use number block and not text block, I am speaking about index in if control under after picking
3- probably you have to save and manage data with list or list of lists to optimise your code
4- In the add button you can save only in label 2 and 5 with this code
Thanks for your help. Can you help please about my block, how can fix my blocks. Your Number 2 , i fix it to number block. Number 4: I didn't add this on purpose because I cannot assign the next listview value to next labels.
.
When I assign a value to a label from the listview, I want the next value I assign to be automatically transferred to the next label.
Learn to use lists.
Thanks
Yes , That's why I said to save and manage data in different way.
There are a lot of way to do this , one could be to save data like list of lists, every item of the list is a list with the values you need ex. Water and its price. You can save labels inside a variable and with any component fill the right one.
After picking probably you need a VARIABLE LIST in support, the list of all the selected items/products, in this way you have a ordered list of products.
Then you can move item 1 to labels 2 and 5, item 2 to 7 and 9 (I don't know the numbers ). Also labels can be saved inside a list ex. Item 1 = label 2 and 5, item 2 =label 7 and 9. So you can connect the first item of product with the firs item of label .
But there are a lot of ways
Dear Raffalele_Gold; thanks your spending time for my problem. I will try with your suggestions, and then i will come back again I wish i solve my problem. See you soon.
It's a pleasure.
Here one way to set your code but I don't know where you set the quantity of the products and how, also think about delete products (this is why I created the list ORDER). Probably using a dictionary to save data you will work better and easier.
This is a little project I created to test and try the dynamic componets of kodular but you can download a dynamic extenstion also for AppInventor (I'm sure extension is more powerful than default componet of kodular). I think you are working about a order app and so I want to ask you : how many labels you have to add ? and what if you need more labels than you added? Have a nice day , my tutorial HERE