Sort associated list

0
Hi, I'm trying to sort an associated list in a microflow. In short: I retrieve an Enquete from the database. Then I retrieve the QuestionList (the associated list of the Enquete entity). Next I Sort the QuestionList. After that I change the QuestionList on the Enquete object with the new 'SortedQuestionList'. The debugger shows the 'ExistingQuestionList' with the original list at the end of the microflow. The SortedQuestionList shows the questions sorted correctly. However the Enquete.Enquete_Question association wasn't update with the SortedQuestionList at "Change 'Enquete' (Enquete_Question)".  Microflow:   Am I doing something wrong? Isn't this the correct way of sorting an associated list?   Thanks.
asked
2 answers
0

Why do you not use the head function to pass the first question from the sorted list? See documentation here https://docs.mendix.com/refguide5/List+Operation

Regards,

Ronald

 

answered
0

I also have this issue, but I really need the list ordered correctly in the association after the change object action, because I am using a ObjectHasChanged Java action after a change action and it shows that it has changed because the order of this associated list changes in the change action somehow. While the list used for this association does not change, I want it to show ObjectHasChanged = false. Can someone help me with this case?

answered