Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Query as FormDataSource, are aggregate fields not working properly?

Posted on by 1,085

Hi,

i'm doing a simple form with a query as datasource.

The query joins SalesTable with CustInvoiceJour and CustInvoiceTrans. I'm trying to group by a custom field on custTable and then retrieve the sum of LineAmount of invoices trans.

This works like a charm when i use this query in a view. But when I put it as datasource on a form all the amounts are zero. Is there a specific method to calculate aggregate fields as Sums?

Thank you in advance

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 229,918 Most Valuable Professional on at
    RE: Query as FormDataSource, are aggregate fields not working properly?

    Aha, OK.

  • Martin Dráb Profile Picture
    Martin Dráb 229,918 Most Valuable Professional on at
    RE: Query as FormDataSource, are aggregate fields not working properly?

    I'm not aware of any such problem. Are you able to reproduce it in a minimized scenario (query with two fields, a form without anything else)? If so, can you share it?

  • Suggested answer
    vv1984 Profile Picture
    vv1984 1,085 on at
    RE: Query as FormDataSource, are aggregate fields not working properly?

    Sorry guys, found it.

    For your information:

    you have to set the Fields node's "Dynamic" property to "No"  and then add a new Sum field.

    Then you are able to add this Sum field in your Form's grid as if it was an actual field of your datasource.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans