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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Query as FormDataSource, are aggregate fields not working properly?

(0) ShareShare
ReportReport
Posted on by 1,087

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

I have the same question (0)
  • Suggested answer
    vv1984 Profile Picture
    1,087 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.

  • Martin Dráb Profile Picture
    236,857 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?

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

    Aha, OK.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
AlissonGodoy Profile Picture

AlissonGodoy 2

#2
NNaumenko Profile Picture

NNaumenko 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans