Working with list and loops in microflows

How do we do the following? Loop through a list Evaluate if value is ‘A’ then change it to ‘Active’, if ‘B’ change it to ‘Inactive’, if ‘C’ change it to ‘Completed’ Create the final list and pass it to a dropdown box.   This is what i have so far and this is not working. :)
2 answers

You have not yet committed the changes.


There is no such thing as an array in Mendix, just lists of objects.

I cannot make this clearly from your explanation, but i assume you have a list of LINESTATUS objects and that each object has an attribute called “value” and an attribute called “ORDER_LINE_STATUS”.

You can loop over the list, and for everyobject check if the value equals ‘A’, ‘B’ or ‘C’ and then set the value of the ORDER_LINE_STATUS to the desired corresponding value.

After doing that, you should commit and refresh the list and you can pass the list as a return value if desired.


Tip: if you are planning to develop Mendix applications professionally, please check out the Mendix naming conventions.