How to sum two attributes in Mendix?

2
Dear community, I have three attributes on an entity: value1 value2 total They are all numeric/integer types, I want the total attribute to reflect the sum of value1 + value2. But I don't get it. I would appreciate your kind help.
asked
2 answers
1

Hi Cristhian,

 

I assume that you have a Form with 3 Fields ( Value 1, Value 2 and Sum )

Set an OnEnter Event with call microflow.

In this microflow change Sum to Value 1 + Value 2.

 

You will find in the Forum more elegent and bether ways, just google "sum of integer mendix"

 

Hope this Helps

answered
1

Hi, Damir, 

 

Iv're tried this, but sum attribute is only taking the value 2 :

 

image.png

 

image.png

 

image.png

 

this event for both values input:

 

image.png

 

image.png

 

And it's not working!

answered