Hi guys, good morning.
I need to make an app. In it I need to load a .csv file with states and their respective cities. When a state is selected in the spinner, we automatically load the cities of this state in another spinner, I don't know, it was clear. Can someone help me?
TIMAI2
July 26, 2022, 10:51am
2
See here, should give you some ideas...
Hello Friends,
I have a working cascading list - Great News
The first pick list i can set the text without any problem see below. The tricky part for me is the next level down, i cant seem to be able to set the text based on selection. I have tried many combinations but I am looking for some advice to resolve this one.
Thanks for your assistance.
This is a long list to i have cropped it.
[Capture3]
[Capture4]
This idea is what I want to do, but I need the list to be made from a csv file.
You need to work with your csv, to convert into List of Lists, and cascade your ListPicker as you are doing now.
ABG
July 26, 2022, 2:41pm
5
Here is some sample code for loading multiple csv files at startup, as part of a project I had lying around ...
To get a table of all US states and cities, I suggest the US Census Bureau.
https://www2.census.gov/programs-surveys/popest/tables/2020-2021/cities/totals/SUB-IP-EST2021-POP.xlsx
would need a spreadsheet program for conversion to CSV format.
I had LibreOffice lying around, so I tried a single column copy, to get full CSV text I could paste into NotePad for upload into your Project's Media folder.
Here is a sample project with table filtering ...
TIMAI2
July 26, 2022, 4:08pm
6
Try this:
cascadeSpinner.aia (3.2 KB)
This is how you can achieve this,
Here, is the CSV file
And, here is your cascading result,
StateCityCascade.aia (64.5 KB)