I am very newbie to App Inventor, but I have tried to read a lot of tutorials and helps about my problem, without success.
I want to populate a Spinner wit the datas in a csv file. This file has 2 columns, one for the kinds of materials, and the other is a property related to that material.
What I want is to populate the Spinner ONLY winth the first column of the file (materials), selecting one of them, and getting the other value in 2nd column as data for calculations.
I only get to populate with both datas from column 1 and 2 in the normal way I have seen in tutorials
I have tried a lot of things by myself without result. Apart, there are a lot of similar controls (ListPicker, ListView, Spiner, etc) and I do nbot know wich is the best for my proposal. This is an option (only one example) of what I have tried:
Once you have loaded the Elements using @dora_paz's code, you would use the lookup in pairs block with the global data and the .Selection value to get your corresponding value for the selected item.
I personally prefer to use List Pickers to save screen space and show a summary or Selected in the .Text, or Listviews if I expect only a small Elements list. I avoid Spinners because there is an exception for the first Element, which I find tiresome.
Thanks to all. It works super fine. I had tried something similar but, obiously without result... Respecto to Spinner, I will try the other controls to see wich is the best.
thanks TIMAI2, it has a very nice look. In the other hands I have tried the ListPicker with the solution given. I am debbuging with my phone by USB. It seems to work, but when I press to show the items, The MIT App closes suddenly to my home screen