Possibility to call a Microflow from inside Expression or Change Object attribute ?

The problem: we have an entity that have several attributes such as Week1, Week2, Week3, etc…  Right now, we have created a long and big microflow just to update the value of these column. The current solution we have (most obvious one) is to calculate for each attribute, put it into variable, and then execute Change Object. We can imagine if we have 10 attributes (Week1, … Wek10) then we will have quite big microflow just to repetitively putting all those activities above.   Now I am trying to find an efficient way of setting the value of those attributes. Alternative #1: Call a microflow from inside the Expression to set the attribute value in Change Object activity The Idea is to create a microflow that will return the value for an attribute based on the parameter. Ex. : getValueForWeek(Integer  weekInt) Then from the main Microflow just use one Change Object activity, and inside the Set Member Value I just need to call the Microflow that I created and supply the appropriate argument Question: is this possible in Mendix?    Alternative #2: Change the attribute value via parameterized call main Idea to call function something like: getEntity(“entityName”).getAttribute(“atributeName”).setValue(value) this function will be called inside Iteration Question: is this possible in Mendix? if yes, is there a documentation / learning path for this? I look for it, but could not find (at least not an example / tutorial that I can try in my local project) I saw the Community Commons module, do I need to make such a module to make it work?   Any suggestions, or just a reference to a documentation, or article, or any other things that might help me is really appreciated! Best regards, and thanks in advance!
1 answers

I would start with questioning why you do have an entity with separated entities Week1, Week2 etc.

Seems to me as not flexible. Why not have a referenced entity Week with a week number.

Add a integer at the start of the microflow, create object using integer value, increase with one, loop back to previous activity. If required amount is reached, step out of miroflow


Though, not sure if this is what you need