Skip to first unread message

Mitch_39

unread,
Nov 1, 2014, 6:12:59 PM11/1/14
to
Hi,

I have been looking on the web for a way to sort a list of lists in ai2. I have seen an effective way of using javascript to sort a list

http://puravidaapps.com/snippets.php#2sort

but I wondered if anyone knew how to extend this to list of lists?

i.e.
Number  title          age
1           hello          12
2           goodbye    15
3           something  6

this list of lists could be sorted by age in descending

Number  title          age
2           goodbye    15
1           hello          12
3           something  6

Thanks

Johnny

SteveJG

unread,
Nov 1, 2014, 7:10:16 PM11/1/14
to mitappinv...@googlegroups.com
Try this tutorial by Sajal:  http://www.imagnity.com/tutorials/app-inventor/list-sorting-on-app-inventor/

You may find this one useful too:  http://www.imagnity.com/tutorials/app-inventor/list-blocks-on-app-inventor/

Does this work for you Johnny?

Regards,
Steve

Taifun

unread,
Nov 1, 2014, 7:37:26 PM11/1/14
to
using the mentioned JavaScript method, you also can sort list of lists
Taifun



sort2.aia

Mitch_39

unread,
Nov 2, 2014, 5:59:08 AM11/2/14
to mitappinv...@googlegroups.com
Thank you both for your reply. Taifun, this is exactly what I was trying to work out, many thanks. Your website has been very useful to me and I will be donating some money next time I use the code.:)
Reply all
Reply to author
Forward
0 new messages