Sub-lists from list

0
Is there a way I could create sub-lists from one main list. For example I retrieve a list of 5 of items. Each item has an attribute of 'name'. So now I can have item1:name=A, item2:name=A, item3:name=B, item4:name=C, item5:name=B. Is there a way from the main list that I can create the sub-lists based on the name returned for each item?
asked
2 answers
0

In a microflow you can select a List Operation action and filter your original list based off of a value. Is that what you are looking for?

answered
0

Robert,

You can check out the Filter and Find List operations https://docs.mendix.com/refguide/list-operation.  These may work, depending on what the contents of your attribute are.  You can use these actions to search for exact attribute values (unfortunately, you can’t filter based on contains, starts with, etc.).

If that doesn’t work, you can build a loop to populate the sub lists, or perform additional retrieves for each subset.

One note: List processing in microflows is typically slower than database retrieves.  If your lists are relatively small, you won’t have to worry about this, but if you have large lists, you will likely see better performance by doing database retrieves.

Hope that helps,

Mike

answered