One thing of interest Angelo - how is your App going to work with multiple names that are identical? In the UK for example, practically every other street has a John Smith. Or is your list not a list of people but a list of first names to help people choose a name for their new born - something like that?
Find attached aia with your text file in correct csv format and 2 sort ways.
ListSort_1.aia (79.6 KB)
Guys I really thank everyone, you are making me excited for your help, I do not know how to thank you, I offer you a virtual coffee and if you are going to travel to Italy, inform me and I will offer it in person. I will try your solutions and I will be able to tell you.
It doesn't work in either.
In the list views even if I delete the .txt file. from the root directory path, they keep displaying the names, and I can't figure out where it loads them from.
Therefore the .txt file is useless.
Unless this extension is good for "other uses", because it is absolutely unusable.
Thanks anyway you were very kind to dedicate your time to me. I'll settle for making the alphabetical list manually from Excel.
In the listpiscker, nothing happens, the list remains in the original template without changing and alphabetizing the names.
Reverse doesn't work either.
Hi Andrea, where did you get the list from? It's Family names only, 14480 of them?
Not sure what you are doing, but applying the text file to my blocks and using the extension works as expected....
sortForlistpicker.aia (65.6 KB)
In this example I see that the sorting speed of the "Lists" extension is a bit faster than JavaScript, on my device the JS code takes 29s and the extension code takes 22s.
Order_List.aia (230.6 KB)
-
I have taken the JS code from this topic by @TIMAI2
https://community.appinventor.mit.edu/t/im-stuck-on-sorting-listview/55199/8 -
fuerzabruta.txt is 381 KB in size and contains 43838 data, I got it from:
Bruteforce Database - Password dictionaries | Kaggle
Here is a simple example using several lists instead of one giant list.
NamesData.aia (72.4 KB)
It is only intended to demonstrate that the method is a practical solution to how the User can make a selection easily.
If the User is going to modify the data, as mentioned before this can be done, including sorting/deleting/adding, but it can't be seen 'live' in a List Picker, only in a List View. So much depends on your preference Angelo, and how much room you have on the App's main screen - if there is enough room for a List View, great, otherwise stick with the List Picker and give the User editing tools on a separate screen (I would use a virtual screen).
I arranged Angelo List with a text editor and LibreOfficeCalc.
Not Family names but Italian municipalities
Ah, so it was not sourced from Angelo - I did think that some of the names were very grandiose Still, a good size list to experiment with.
But I followed the instructions, I didn't do anything that wasn't already included in your blocks.
I created the common2.txt file, I replaced the names with my other names in the short list, messing them up, I tried to use the app to put them in alphabetical order, but instead of my names in the .txt file, the list displays l The list that I posted is very long, without a file containing it, since I replaced it and I also did the test by deleting the .txt file, but it continues to load the list without it existing anywhere.
Thanks Chris Ward, your .aia file may be useful for other situations, I find it really very useful, maybe it could solve the problem for me.
I explain melgio to everyone:
After having prepared the list, possibly also in alphabetical order, (for professionalism not for functionality) because what I have to do can also have the names in disorder, but in an app I cannot not foresee that the user wants to want to order the list.
Once the list is sorted, select the names I need and through a button and a timer, send all the selected names, data automatically without having to send each time for each name.
It seems you have some fundamental issues with your blocks code, designer entries and workflow.
Please share your aia project, including your original text file. 5/6 people have provided you with help, none of which seems to work for you. Perhaps by showing us what you are doing (by sharing your aia) will allow one of us to provide the solution you seek.
I do not believe, there is any other recourse....
That functionality can be added to my example - instead of a single name sent to a textbox, multiple selections added to a temporary list.
Re TimAI2's post, I think it would help us more if you draw a schematic of the GUI and the process. Can be hand-drawn and scanned or using a free drawing tool such as inkscape. It is always best to do this before trying to write an App, so that no 'gotchas' are overlooked.
We also need a description, what is the goal of the App.
Non ho ancor a una idea chiara di come procedere, ma lo schema rapresenta quello che dovrò riuscire a fare.
Il pulsante invia, avvierà un timer che ogni 3 secondi dovrà inviare i dati alla lista dei nomi selezionati dalla listpicker e riportati nell'altra list.
Questidati, potrebbero essere inseriti in un file .txt o un file .csv, penso, e questi nomi potrebbero essere centinaia, o forse migliaia, dipenderà da quanti aderiranno all'iniziativa, iscrivendosi.
Naturalmente dovrò imparare a fare il ciclo per l'invio e non so proprio, da dove iniziare, soprattutto, come faro ad estrapolare i dati dal file .txt o dal .csv. e inviarli con il timer???
Sarebbe sicuramente più veloce e funzionale, se una volta selezionati i nomi, nella listipicker, io potessi già inviare, solo ai nomi selezionati i dati, senza doverli prima trasferire in un file.
Spero di avervi spiegato bene.
Cosa completamente diversa dal contenuto del primo post e dal file di testo allegato.
Hi Angelo
Given that several names need to be picked in one session, a ListView might be a better choice, because it stays displayed, whereas a ListPicker closes when the selection is made.
Where exactly does the 'Data' come from? Is it updated regularly?
I see you have a Save Name button - what about Delete and Edit?
Maybe I explained wrong. I try to apologize to you and your patience. Thanks once again to all of you.
The listPicker can get a list of names from me, and I have sent you a list of example names that I found on the net, which represent any names that I could enter because maybe I have extrapolated them from another hypothetical list.
Once my names have been entered or not entered, the listpicker would still be populated by the names of users who subscribe, or are added to any entered names, then the save (Add) button is used by the user, who will save the data in the TinyDB populating and adding its name, to the other names in the listpicker.
This is why the list could get very long.
Of course, then I will need, as you rightly expected, other buttons, including the one you mentioned.
However do not worry now I will proceed by myself Some of your suggestions were however important to me, they will help me to
Better understand how to proceed. If I have difficulty I will ask for some help again, thank you all.