| Zoha Zulfiqar
A Rollup field contains an aggregate value which is calculated from records related to a specific record. When you create a rollup field, there are two other fields created with it automatically – a Date/Time field which shows the date and time of the most recent calculation and a Whole Number field to show the status of the calculation.
Here is how to create a Rollup field.
Source Entity – it is set by default as the entity you are creating the Rollup field in, you don’t need to fill it in by yourself. Another option here is to add a hierarchy.
Associated Entity – It allows you to add any related entity to the Rollup field calculation, you can add filters to specify the records you want for aggregation. If the hierarchy has been selected, then this is optional.
Aggregation – This is where you can choose the function to aggregate your data. Following are the aggregate functions that can be used in a Rollup field: Sum, Count, Min, Max and Avg.
As you can see in the image above, there is a message in the bottom which says that a rollup field can be refreshed after 12 hours by default.
If you have administrator privileges, you can navigate to Advanced Settings - System Jobs under Settings - click on View - select Recurring System Jobs. Here you’ll see a Mass Calculate Rollup Field for the calculated Rollup field that you just created. You can change the time of refreshing the calculation or the easier way is to add a JS method to the form’s onload event so that every time you open the form, your rollup field will be calculated automatically.
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.