Microflow does not trigger properly on change event and save button

0
Hello, I have a popup that has a on change event that triggers a microflow. The popup asks for a numerical input (product quantity) and calculates the price and commit the object when from the user leaves the textbox. I have also added the calculation microflow to the save button.    Sometimes, when I input the quantity and directly click on save, the microflow does not trigger properly and leaves a blank entity object instead of the calculated one. The blank entity cannot be edited but can be removed. The entity is actually saved but not properly refreshed in the page, I need to refresh the page to see the item properly.   How it should look like: How it looks like when the issue happens:   This problem only occurs when running the app from Mendix Cloud. when run locally, the issue does not occur.   Please kindly help me if you have similar experience.   Thank you for your attention. Best regards, William Samadi
asked
3 answers
0

sounds like your value is being saved before the change microflow has been executed.

you could add a validation microflow on the save button, so it checks to see if the value is not empty.

not if it is on leave, you are not leaving the field, so make sure it is on change :D hope this helps

answered
0

Hi William,

 

Try calling same microflow as an On Change Event instead of On Leave event.

 

I hope this helps.

 

 

answered
0

Hi William,

From what I understood, your calculation works properly in microflow but the same result is not refreshed on the page.

When you save the changes, along with committing, have you enabled refresh in the client as well? If yes and still it is not working, then you need to check after your object is getting modified, if all the associated data containers are getting refreshed or not, so that it will show the updated value on the page. Please refer to below link for a better understanding of refresh in client - https://docs.mendix.com/refguide/change-object/#refresh-in-client

Hope this helps.

Regards,
Naman

answered