Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Instant Summary Number

(0) ShareShare
ReportReport
Posted on by 1,151

Hi,

I would like to create some Summary type column that shows total number of Quotes for example. This would be done on both the Contacts Table and the Account Table. This column would also be used in a view.

 

For example I could add a Quote then go the Accounts view and as I scroll down the Accounts view, it would add an extra 1 to the number of Quotes related to the specific Account.

 

Key is that data would need to be current all the time.

 

Wondering what the best approach would be?

 

To my knowledge, a Rollup Column would only update every 12 hours? Would a flow be a better approach that could fire every time a new record is added to the Quote table, therefore only doing updates to effected Accounts?

 

Is a formula column the better option but would it be effective as I scroll down my Accounts view?

 

Thanks in advance for any assistance

 

Todd

  • a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: Instant Summary Number

    @Tango hello,

    Here is what rollup column configuration looks like:

    a33ik_0-1718733078259.png

     

    a33ik_1-1718733312947.png

    In my case I used aggregation over contacts because my test environment is "CDS" one so it doesn't have quotes but it should be straightforward on how to build the Rollups over quotes.

  • Jonathan Manrique Profile Picture
    2,678 on at
    Re: Instant Summary Number

    Hi @Tango 

    So for now I recommend doing it with a consolidated field although keep in mind that it will be deprecated.

     

    Then to force the calculation you can use power automate, since there is another way to force it but using JS and you need to enter the form for it to be executed.


    The other option is to do it with Power Automate, but depending on the volume it will take more or less.

     

    What you would have to do is first obtain all the accounts and then use those accounts to obtain the list of appointments associated with that account, use the length expression to count and with that value that you have obtained update the field of the accounts table.

     

    You must say this if you program it once a day or every few hours and you must be careful with making an infinite loop


    With Power FX you won't be able to.

  • Tango Profile Picture
    1,151 on at
    Re: Instant Summary Number

    Thanks @Jmanriquerios but this column will be in the list view and not the form view

  • Jonathan Manrique Profile Picture
    2,678 on at
    Re: Instant Summary Number

    Hi @Tango 

     

    There are several ways to do it, what you propose about Calculated Columns is an option but it will soon be deprecated, the Power FX option does not support it for now, since they are polyform columns.

     

    The other Power Automate option, there is a lot of material on how to do it, but I would stick with the traditional process for now. Using a JS that counts the appointments associated with an account or a contact, I would place a view in the subgrid that shows all the rows of appointments associated with that account or contact and then count the rows.

     

    function Onload(executionContext) 
    {
     
     var formContext = executionContext.getFormContext();
     var gridDocumentos = formContext.getControl("Subgrid_new_1");
     if(gridDocumentos != null)
     {
     let countDocumentos = async function () { 
     
     var countviewDocumentos = gridDocumentos.getGrid().getTotalRecordCount();
     var totalDocumentos = parseInt(countviewDocumentos);
     formContext.getAttribute("enc_ndedocumentos").setValue(totalDocumentos);
     formContext.data.entity.save(true);
     };
     gridDocumentos.addOnLoad(countDocumentos);
     formContext.data.refresh(true);
     }
     }
     
    } 

     

    I show you a code that you can adjust to count the appointments.

     

    Then I suggest you use the new views functionality where you can use groupings and totalizations to count the total, I'll give you an article that I wrote

     

    https://www.linkedin.com/in/jonathan-manrique-rios/recent-activity/articles/

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 15

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics