Sorting of lists

Hello to all, I am new to Mendix and have a problem with sorting lists: I have several objects with names of persons and timestamps of when they logged in.  If I retrive the list the names in a microflow the objects with the names are there several times. Is it possible to sort this list so that each name exists only once?   Thanks for the help - Pascal
1 answers

Well normal sorting of your list is easy with a database retrieve in a microflow:
You can just use the sort option and sort the list on for example the name of the users.


If you have multiple records with the same name in the list however, and you want you show each username only once you would have to do some form of list actions depending on what your exact use case is.

For example create a new list, start a loop and iterate over your retrieved list.
Check everytime if there is a record with the username of the iterator 
If not, add the iterator object to the list

If yes, dont add the record for the list