Change Action not functioning

Hi Community, I have a page which uses radio buttons and enumerations, enabling the user to pick between four options. I have then created a microflow which changes the values of attributes in the "score" entity, depending on the selection. However, the values are not changing when I run the microflow - they stay at the default value of 0. The exlusive splits for the "EmailScore" repeat for each of the different questions. For example: $General/Email = ConsultancyTool.ENUM_Email.E1 I then have exlusive splits which add up the individual scores and based on the amount, will change the "comment" attribute. I would then like to display this comment on the page, so I have a show page action at the end of the microflow which passes GeneralScore. Any help will be much appreciated!! Many thanks Austin Full microflow:
2 answers


Have you run this in debug mode to see what happens?  What happens when you debug?

If you are calling this from a page, you probably need to commit the page object (seems like this is Financial Result).

Also, if any of the attributes is empty (for example, if the page object was committed), you will never take one of the true paths, so you'll have 0 values.

Hope that helps,



Austin - the General object you are retrieving in the ACT_PassingScores microflow doesn't have values for enumeration attributes (seems like they are always empty).  The second microflow you sent does commit the General object correctly.  I don't know the structure of your application, but to resolve this, you'll need to track down why the General object you retrieve doesn't have enumeration values.  If you are committing a General object from another page (with attribute values), then you can be confident that you're not retrieving that same object.  Maybe that will give you some ideas about where to look.

**EDIT 2**

When you create an object, you (usually) need to explicitly set what the values of an association are.  As a for instance, lets say you have Order and OrderItem entities with an association between the 2 such that each Order can have 0 or more OrderItems, like this:

 If you create an OrderItem object in a microflow, you would need to set the value of the OrderItem_Order association to a particular Order object so that the newly created OrderItem belongs to that Order.  In a microflow, that would look like this:

If you create an OrderItem manually, for instance from a Datagrid whose source is the association between Order and OrderItem, Mendix will set this association for you.  See an example below:

In that example, the New button (which is a Mendix Create button) will populate the Order association for any new OrderItems create.

Let me know if you have any additional questions.


It might not be the sollution to your problem since I have no clue how the form looks, but you forget to set the reference between GeneralScore and General. And set a breakpoint at the beginning of the microflow to see how the microflow behaves and you can then also check the values of each entity.