web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Instant Summary Number
Power Apps
Unanswered

Instant Summary Number

(0) ShareShare
ReportReport
Posted on by 1,164

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

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,687 on at

    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/

     

  • Tango Profile Picture
    1,164 on at

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

  • Jonathan Manrique Profile Picture
    2,687 on at

    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.

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    @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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard