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)

How to display sum of multiple values for a form in AOT

(0) ShareShare
ReportReport
Posted on by

Dear Experts,

Example: Behind the highlighted area (Remaining quantity) there's sum of various value quantities "On-order, Reserved physical and Picked". Currently out of 120, there's 80 Picked, 20 Reserved physical and 20 On-order. How do I tell the system in AOT to display sum only of 2 statuses "Reserved physical and On-order" so on my form it would show me remaining quantity 40 instead of 120?
TEST_5F00_1.png
Any suggestions are welcome.
Kind Regards,
V

*This post is locked for comments

I have the same question (0)
  • Vilmos Kintera Profile Picture
    46,149 on at
    RE: How to display sum of multiple values for a form in AOT

    Please take your time to verify answers by ticking the checkbox next to each helpful answers in order to close the topic and assist other users with similar problems.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: How to display sum of multiple values for a form in AOT

    That would be a calculation in a display method on the table. Then depending on what your source values are, you could do the summation in different ways. If it is data in one or more tables, you could join them together and do a sum() aggregate function for the values in a select statement, a query or a view.

    select sum(ValueA), sum(ValueB) from table where table.selectionField == 'selectioncriteria';

    return table.ValueA + table.ValueB;

    The same can be achieved by doing a View to retrieve the values. It could even be an SQL Computed Column on the View if needs to be. It really depends on how does your source information look like, and how much do you care about performance optimization for the function.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Rahul Shah Profile Picture

Rahul Shah 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans