Listpicker data in alphabetical order

I have data in a listpicker, how can I sort it automatically and alphabetically?

The same thing is possible on LIst view.

Try a search on the community for "sort list". You will find many answers.

You have to sort the list as TIMAI2 suggested, then populate the ListPicker or ListView

See tutorialSort list with blocks
or use an extension

Hello Angelo

Snippet on my website (apply to List Picker too):

1 Like

It doesn't give me any results.
I had found something but I can't find it anymore.
But the code was incomprehensible to me, because particular explanations were given.

I did not seem to see that there was an example, better if file .aia on how to put the contents of a listpicker in alphabetical order and decree one, however I will try.

Having solved the listview one is great.
If you find something, thank you in advance.

Thank you very much for fixing the listview order and great.
If you find anything about ordering the listpicker, thank you in advance.

List picker uses a list as elements so before picking sort your list and set elements to that new sorted listed.

As already said, you can sort the source list, the populate the listpicker instead of listview

Maybe or understood and maybe not, you all have to excuse me, In short, is it possible to carry out that alphabetical sorting in the listipicker, by pressing a button within the app so that if I want the descending or increasing list it can be done?

If your explanations mean that I can do this with the blocks you have already indicated to me, thank you and sorry for my ignorance, I will try to figure out how to do it.

Hello Angelo.

The List Picker consists of rows of 'items'. In my example (which uses a List View, very similar), the rows of items are stored in a static Block List.

Where do the items for your List come from? Are they in a Block List, or perhaps they are imported from a CSV file?

I'm in listpicker's eElementsFromString
They are simple personal names, separated by commas.
In the properties tab

I am not interested in listing them in Webviewer, or in a text file or a label, but that they are put in alphabetical order within the same listpicker, by pressing a button in the app.
Of course if it were possible to do so.

OK, so they never change then? Instead of typing them into the Designer, make them into a Blocks List:


YES but when they become as many as the listpicker can contain, (which would already be interesting to know, because I tried to insert more than 180000 and it crashed), it will be a challenge to transcribe them one by one.

18.000 non 180.000

That's just a means to an end Angelo - the WebViewer can sort a List very quickly using a simple Javascript, as per my example. The List is not displayed in the Web Viewer and the Viewer can be 1 pix x 1 pix in size. No internet required.

Edit: In fact the WebViewer can be invisible (thanks TimAI2)

Then it would be worth inserting them in an excel sheet, putting them in alphabetical order and then copying them in the listpicker, it would be much simpler, but I would like the user to be able to do it via a button.

Even more difficult to do in the Designer Properties :koala:

So, have you typed them all into the Designer?

Do the names in the List ever get changed? Delete or Add a new name?