Sorting a list alphabetically


#1

How can I sort a list in alphabetical order. I don’t want to use a webviewer.
Example:
Listviewer entries: index, name, first name, dateOfBirth

1, Gabriel, Peter, 12/02/1977,
2, Jackson, Michelle, 03/03/1955
3, Aronside, Jon, 06/30/1975
4, Smith, Johanna, 01/25/1948

How can I now sort the list with the names in alphabetical order?


#2

@WebAtelier_mt try using ListUtils extension. Create a list that has each row as list item. Then use that extension to sort


#3

Thanks, where can I find that?


#4


#5


protip: do a search in the forum next time…
Taifun


#6

Sorry, but I do not really know what I have to do with Listutils.
Does someone have an example for my dataset shown above?
Thanks a lot.


#7

@WebAtelier_mt please follow above link that was posted by Taifun


#8

OK, this works for a,b,c,h,s,d,… but not for
1, Gabriel, Peter, 12/02/1977;2, Jackson, Michelle, 03/03/1955;3, Aronside, Jon, 06/30/1975;4, Smith, Johanna, 01/25/1948
to be sorted as:
3, Aronside, Jon, 06/30/1975
1, Gabriel, Peter, 12/02/1977
2, Jackson, Michelle, 03/03/1955
4, Smith, Johanna, 01/25/1948

I don’t have any idea.


#9

for sorting lists of lists you also can use this

How to sort a list using the webviewer(!)
You also can sort list of lists using this method, see an example here.

protip: you might want to adjust that solution to your needs…

Taifun


ListUtils sorting
#10

The issue is that you are dealing with strings.

Let’s say your data is:
A20
A100

When you sort ascending result will be:
A100
A20

Again, you are dealing with strings and that’s how it’ll work


#11

actually sir my data is
110
90
85
82
80

after sorting in descending order it shows

90
85
82
80
110


#12

That is correct sorting because all items are treated as string. Try to put later A in front of them then sort them in excel and see result