cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

Is there a way to calculate totals in model-driven apps?

Hello I am trying to get the sub total of a bunch of entities that have a many-to-one relationship with another entity. I was able to get this to work in a canvas app through the use of filtering and Sum() but don't know if it is even possible with model-driven apps. I first thought of using a Flow but then see that there's no way to send data back to a model-driven app the same way I can with a canvas. 

 

model-driven-app.png

 

Is this possible with model-driven apps or should I just stick to canvas?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Mgodby ,

 

If you want to sum the total field from child entity, you can create a Roll-up field to calculate the aggregation.

The rollups are calculated by scheduled system jobs that run asynchronously in the background. The asynchronous job executes once per hour, attempting to recalculate the rollup attribute. In additional to the hourly system job, users may manually force a system recalculation.

Note: You should have write access on parent entity 

Snipaste_2019-11-25_18-02-26.png

Snipaste_2019-11-25_18-10-37.png

Best regards,

Sik

View solution in original post

2 REPLIES 2
Yocomd
Helper I
Helper I

Roll-up fields allow you to sum fields on a one-to-many entity, but those only recalculate every 12 hours, so if you want to see it updated immediately, they're not ideal. (They do have a refresh button attached to the field, which the user can click to force it to recalculate, but you probably don't want to expect the user to do that).

If you can write JavaScript, you could create a Web Resource with a method that pulls in the data, sums it, and fills in the field with the summed value.
v-siky-msft
Community Support
Community Support

Hi @Mgodby ,

 

If you want to sum the total field from child entity, you can create a Roll-up field to calculate the aggregation.

The rollups are calculated by scheduled system jobs that run asynchronously in the background. The asynchronous job executes once per hour, attempting to recalculate the rollup attribute. In additional to the hourly system job, users may manually force a system recalculation.

Note: You should have write access on parent entity 

Snipaste_2019-11-25_18-02-26.png

Snipaste_2019-11-25_18-10-37.png

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,084)