How to Store calculation from One entity to another?

0
  Hi,    This are my two Entity. What I want to do is When I Put number for CourseCredit It will multiply by the 500 and it will automatically store in the Bills attribute. for example  Course Credit = 3 Multiply by 500 = 1500. Course Credit = 2 Multiply by 500 = 1000 Total = 2500   I want that 2500 to appear in the Bills. How can I do that?
asked
1 answers
1

With your current domain model that would be quite hard. First your CourseCredit is a string instead of a decimal. Second problem is that the reference between those entities a one to multiple association. So how do I know which Studentfinancialinfo I should adjust?

What you could do after you changed the CourseCredit to a decimal is make an on change microflow that just creates a Studenfinancialinfo object, set the reference to Course and calculate the Bills value (which is also by the way a string instead of a decimal) change the attribute and commit all the objects.

Hope this helps a bit, but I would advice you to follow some learning paths in the academy.

Regards,

Ronald

 

answered