Hello
I will instert a list from my mobile phone in a Listpicker . Examble
I have a file with the name list.csv in my mobilephone as,fd,erf,dsas,ddf,fgh,ffg,fgg,fgh in /list.csv and I want to instert them in a Listpicker one below the other.
I have made the following
The "list from csv table" block creates a list when there are newline characters "\ n" in csv. When there is only one row, it will create a single-item list that contains the column list. It happened here.
I give you the same list in two forms. One with a comma in a row and one without a comma in a column. Please enter it in a listpicker and write me the code or send me the aia . Thanks List2colum.txt (271.3 KB) List1row.txt (265.2 KB)
CSV files have commas. Your first csv file has spaces. So before making a list from that csv, replace the spaces with commas. Or create a valid csv file with commas.
For AppInventor, columns are to be separated by commas, lines are just a new line (Enter on the keyboard).
please try to put one of the above lists on a Listpicker to tell me if it was done.
When I insert list1row.txt with list from csv row (because it has commas) or list2colum.txt with list from csv table (it one colum with new lines) the application crashes and closed !!!!
It worked, but I do not want it that way. I want the city name and state Id and country Name Write on a line for selection , as in my list List2colum.txt (271.3 KB)
Thanks !!!!!
I will try it later.
I also want to ask, how can the line number of the item I selected appear?
For example, from a list of 5000 items, I select the 150th item from the Listpicker.
How can 150 appear somewhere?
Get the index of the selection. However, if you are using the search filter the index will be different, in which case you will get the index of the filtered list not the whole list. To overcome the, you could get the index from the supplied list using a contains block (possibly with the city name) to find the correct item and index. You may need to create a global variable for cities in my example instead of a local one.