Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

rollup field not working

(0) ShareShare
ReportReport
Posted on by 40

I created a brand new environment. I created a new entity called donations. I created a currency field in donations and then created several records with donation amounts in them. I created another entity called totals. I created a currency field in totals called totalOfDonations and made it a rollup field. When the popup opened there was no related entity so I went to customizations and created a relationship between the totals entity and the donations entity. Then I went back to the popup for the totalOfDonations field and was able to select the donations entity as the related entity which then meant that I could define a sum of donation records. I added all of these fields to my forms and created views that included them all. My problem is that when I created a record in the totals entity and then clicked the recalculate button nothing happened, it just showed zero rather than the total of the donations like I was hoping for. I would appreciate any tips, please.

  • Gerald Dahl Profile Picture
    Gerald Dahl 40 on at
    RE: rollup field not working

    Hao - thanks for you quick and helpful follow up. This is the first time I've ever posted a question and got an answer that I could apply - plus your tip on how to delete fields is working for me too. Thank you so much. My roll ups are working now.

  • Gerald Dahl Profile Picture
    Gerald Dahl 40 on at
    RE: rollup field not working

    Hao, thanks for your prompt and clear and helpful tips. I got my rollup field working!

  • Verified answer
    LuHao Profile Picture
    LuHao 40,874 on at
    RE: rollup field not working

    Hi Gerald,

    Let me solve some of your problems.

    1. why in the donations entity I have to pair each donation amount with the lookup record field.

    The rollup field does not automatically select the summary range, we need to manually select which records to participate in the summary by looking up the field.

    For example, I have 10 Donations records and 2 Totals records. I want the first Totals record to summarize the sum of the 1 to 5 Donations records, and the second Totals record to summarize the sum of the 6 to 10 Donations records.

    Then, we need populate the Totals lookup field of the 1 to 5 Donations record with the first Totals record, and populate the Totals lookup field of the 6 to 10 Donations record with the second Totals record.

    If there is only one Totals record, then we still need to use it to populate the Totals lookup field of Donations records. Otherwise the rollup field does not know which Donations records to summarize.

    2. if I could get the flow to automatically fill in the value of the lookup field so that I didn't have to select if for every record I create after I enter a donation that would be great

    It can be done easily with a workflow. I would recommend that you post a new theme for this, and I will provide you with detailed steps in the new theme.

    3. I can't delete those failed fields

    It may be that these fields have some dependencies, we can check them by clicking the Show Dependencies button in the field settings interface.

    We have to remove the fields from all these dependencies in order to successfully delete the fields.

    For example, if this field is on a form, then first remove the field from the form.

    pastedimage1574218240949v1.png    pastedimage1574218256742v2.png

  • Gerald Dahl Profile Picture
    Gerald Dahl 40 on at
    RE: rollup field not working

    Thanks Hao - I will give this a try. I might begin by creating a new trial environment first in order to apply your suggestions. The current entities I'm working with are filled with failed fields and it's a bit confusing to know what is relevant and what isn't. Plus I can't delete those failed fields so as you can see I'm a newbie. But I did follow your step 2 advice and did get the donations to add up for the first time. It's just that I'm not sure why in the donations entity I have to pair each donation amount with the lookup record field. I use flows to create records, so, if I could get the flow to automatically fill in the value of the lookup field so that I didn't have to select if for every record I create after I enter a donation that would be great, because, I might forget the step to enter the value of the donation lookup field. Like I said I'm a newbie and it takes me a lot of messing around before things get clearer and simpler. At any rate, thanks for your helpful response and if I can get it to work consistently in my context I will happily mark it as verified. Thanks for your patience and understanding. GERALD DAHL

  • Verified answer
    LuHao Profile Picture
    LuHao 40,874 on at
    RE: rollup field not working

    Hi Gerald,

    In order for the totalOfDonations field to take effect, you need to associate the Donations records for this Totals record.

    There are two ways, choose one.

    You have created a 1:N relationship for the Totals entity and the Donations entity, so the Donations entity has a Totals lookup field.

    This lookup field is the display name entered when the relationship was created.

    pastedimage1574147867530v1.png

    1. Populate the Totals look up field in the Donations form.

    Open the form editor of Donations entity, add the Totals look up field to the from body.

    pastedimage1574147985511v2.png

    Go to the Donations form, populate the Totals look up field and select the Totals record you created.

    pastedimage1574148623431v3.png

    2. Add the records into the Donations sub-grid of the Totals form.

    Open the form editor of Totals entity, add a sub-grid, select entity as the Donations.

    pastedimage1574148927233v4.png

    Go to the Totals form, add the existing Donations entity. 

    pastedimage1574149235117v5.png

    Choose one of the above two ways, I recommend using the second one.

    Then you refresh the rollup field and it should take effect.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans