Update attribute value of an entity by a button - Mendix Forum

Update attribute value of an entity by a button

0

Hello all mendix developers .  I have a question is that how I update the attribute value of an entity that has already created. For example , lets assume that I have an entity called “Policy” and there is an attribute called “Agreement” and a data is already created “No” . But now when I click the “Agree” button I want to change that data into  “YES”.How I do that ? Is there any way or microflow please provide me thank you . 

asked
2 answers
2

Hi,

Yes this is easily possible: have the button connect to a microflow, include the entity you would like to alter as an input parameter, and change the attribute value using a change activity.

I’d suggest going through (at least the start of the) Academy Learnings, all Mendix basics are covered here so you start developing functionality. Good luck!

answered
1

You could create a microflow (or a nanoflow) and set it to execute once an user presses the button. In this microflow you can put a ‘change object’ action in which you change the attribute. A possible way of doing this would be:

not($Policy/Agreement)

It's up to you then to decide whether you also need to refresh/commit the object.

answered