Sorting pairs within a list or tinydb

This feels like it should be so simple yet i have spent hours struggling with it.
i want a sorted list of pairs.
So lets say 4 names (text box or labels) each with user entered values (text boxes)
so bob, fred, bill and harry get different values assigned to them and i want to be able to put them in a list (or tiny db) sort them from highest to lowest and write them into another set of paired text boxes (or labels)
Its simple logic i know and i could have done this hours ago in vba-excel but i cant see how to do it here.
my screen is a mess of aborted tinydb and list procedures!
I really would appreciate being pointed in the right direction

thanks

Use the advanced list blocks (check the examples) to sort lists and lists of lists

1 Like

See part 2 here

http://ai2.appinventor.mit.edu/reference/concepts/pholo.html#sortwithcomparator

Tsifun

1 Like


sample run
table_sort.aia (2.5 KB)

(Change the '<' to '>' to get descending order.)

1 Like

Thanks for this - really useful