cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Djbazuka
Frequent Visitor

How to Automate RollUp Field Calculation

Hello Everyone,

 

I am trying to automate the calculation of Rollup Fields.

 

But there is a catch!

 

I know about the system job that works on an entity level to update all the rollup fields in timely manner.

 

What I want to achieve?:- I have 2 roll up fields on account entity and want them to auto update but I want 1 field to update hourly and 1 to update only once a day.

 

Problem:- Since once job would run on all fields on the entity, I cant seem to find a solution where I can achieve the above.

 

I would appreciate any help possible.

 

Thank you.

4 REPLIES 4
ArchitectMadhan
Super User
Super User

Hi @Djbazuka ,

 

You can select the rollup field job for which you wanted to set hourly refresh and other roll up field job can be set for Daily. Use the "Advanced Options" from the PowerApps environment -> Settings.

ArchitectMadhan_0-1657876196147.png

 

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.
Djbazuka
Frequent Visitor

@ArchitectMadhan 

 

So, I have created 2 fields on Account Entity called :-

  • Count of Contract (Rollup)
  • Count of Outstanding Invoices (Rollup)

When you create the initial field 2 system jobs are generated 

  • one for account entity (on which recurrence/time can be adjusted, this job will calculate all the rollup fields on account entity)
  • Second one is generated specifically for field (on this you cant adjust the time)

Djbazuka_0-1657876661479.png

 

When you create 2nd one only one system job is generated

  • Again for that specific field (on which time cant be adjusted)

Djbazuka_0-1657876893109.png

 

In total I get only 3 jobs from which I can adjust time on only one, on top of that for the one I can adjust the time it updates all the rollup field on account entity.

 

Field specific system job :-

Djbazuka_1-1657877060628.png

As you can see no option to adjust the reccurence.

 

Account specific system job:-

Djbazuka_2-1657877128515.png

As you can see I have option to adjust the recurrence but on account entity which will calculate all the rollup fields on at the same time. 

 

My goal is to adjust time for both the fields separately

 

Here is the list of Rollup field system jobs I have :-

Djbazuka_0-1657877322157.png

 

 

Djbazuka
Frequent Visitor

@ArchitectMadhan Any idea how would we do this? Is this even possible?.

dpoggemann
Super User
Super User

Hi @Djbazuka ,

 

I don't think it is possible to change the schedule at the field level for the rollup on a single entity.  Both will rollup on the schedule you define.  

 

One option you might look at here would be to not utilize rollups at all for this and leverage something like a Power Automate flow?  Just a thought...

 

You could setup two flows that would run hourly and daily and would loop through the parent entity instances and read all the child records (appropriate fields) and sum / count etc. and update the parent entity.  

 

I know this is basically replacing the rollup fields but would allow you to accomplish your goal.  

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,122)