Math operation in Entities

-1
Hi all, I am new in Mendix. can I use microflow to divide two Attribute of two difference Entity  in a new Entity? For examplel, I need to create an entity in which the attributes of the other two entities are divided. Do I need a microflow to do this? If yes, someone can guide me on how to do it? Thanks
asked
9 answers
1

Hi Sayeed, 

Consider I have an entity with three attributes like below

 

You can create variables like this and store the value to your new entity attribute

answered
1

Hi Saeed

As per my understanding, you want to divide operation between two entities and store results in the third entity if I am correct then you have to follow the below steps :

first, retrieve these three entities where the attribute you will use to divide, create variables, and perform operations like a divide.

 Thank you.

answered
0

Hi Sayeed, 

I think, You are trying to store the value in new entity after dividing two attributes from two different entity?

Am I right?

answered
0

Yes Stella.

Thanks Nikhil, but where muss i Perform operation? Sorry, i can’t find that

answered
0

Hi Saeed, 

The following documentation will  guide you to perform arithmetic operation

https://docs.mendix.com/refguide/arithmetic-expressions

answered
0

Thank you Stella,

I had seen this document. Please just tell me where to do these actions. In the Domain model? It does not allow me there. On Overview Page? I can not do this operation in columns either.

answered
0

Thanks a lot!

answered
0

Hi Stella, Sorry!!

Can you please tell me, where muss i call this Microflow ?

Thanks a lot

answered
0
  1. If you make  the new attribute as “Calculated”  in the domain model, option will show up to add a microflow. You can add the microflow there. However, be careful, there is always a call one has to take “Calculated” versus “Stored”. If your field is going to be changed more often than viewed, please use this option.
  2. But, if it is going to be viewed more and changed very few times,  you need to use it as stored field You will than add microflow in the pre-commit event of the entity

 

answered