How can I create a linked list in Mendix?

I have a list of non persistent entities in Mendix. How can I turn this into a Linked List? I can create a self-association "Next" in the data model, but I  do not know how to create the entries. Normally I would create a variable to the "Previous" object and in the loop do the Mendix equivalent of    $Previous/Next = $Current; $Previous = $Current  However, in Mendix I cannot re-assign an object reference.   
1 answers

Hi Hans,

What if you sort your list view by created date? Then in a microflow, you can pass your selected object, retrieve the non-persistent list, sort the list, and then iterate the non-persistent list, use an exclusive split to match your paramter object to the objects that you are iterating, if you get a match, set a flag, then some how use a variable to uniquely identify the next object, use a break to end the iterator, and then use the list operation find to retrieve the single object out of your list and show the next detail page. 


Edit: Here is an example microflow. Not sure if this is the best way to do this.