Refresh a calculated attribute on a page with uncommitted changes

0
Hello,   I have a data view displaying editable text boxes and a calculated attribute, which depends on the values of those boxes. The text boxes change attributes of objects associated with the object that owns the calculated attributed. I would like to refresh the calculated attribute on change of each such text box.   What I tried is creating an on change microflow that refreshes the object that owns the calculated attribute to trigger the recalculation. However, this only seems to work if the on change microflow commits the associated object as well, which is not what I want.   Is there a simple mendixy way to refresh a calculated attribute based on uncommitted changes of associated objects?   Thank you, Alberto
asked
1 answers
0

Hey Alberto,

You can do this by creating a NPE ,

Now add the data view on the page where you want to impliment your logic, 

Now, set the data source of your new dataview to microflow and add a create activity which creates the NPE object. 

Now put your old dataview in your new data view, and now apply an on change event on the text boxes which refreshes the NPE object, and then apply your own logic for calculated attribute change.

This will lead to data view being refreshed and ultimately your own dataview being refreshed.

 

But make sure that your caculated attribute doesn’t change on the base of your textboxes.

 

HOPE IT HELPS! 

answered