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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to get sum value of a field

(0) ShareShare
ReportReport
Posted on by 3,805

I have some ProjId in table ProjTable.

If i select one ProjId, and i click Work breakdown structure.

Example:: I select PROJ-1406-01, then i click work breakdown structure.. i have some activity from table smmActivities, example :: Activity01 and Activity02....

table browser : ProjTable

ProjId Name Total Percent
PROJ-1406-01 Project A
35
PROJ-1406-02 Project B ?
PROJ-1406-03 Project C ?
PROJ-1406-04 Project D ?
PROJ-1406-05 Project E ?
PROJ-1406-08 Project F ?
PROJ-1406-09 Project G ?

table browser : smmActivities ---> PROJ-1406-01

ActivityNumber PII_ActivityName PII_Percent
A14-00001 Activity01 15
A14-00002 Activity02 20

My problem, i want to sum PII_Percent based on ProjId.

Anybody help me, how to select sum.

And, where i can put code or methods?

Help me please, thanks.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    I believe you can link projects and activities with smmActivityParentLinkTable. Use sum() function in a select statement, e.g. select sum(PII_Percent) from ….

    You can implement it as a display method (and you will probably want to cache it).

  • fajar Profile Picture
    3,805 on at

    Thanks Martin..

    where i can put display methods?

    in table smmActiviities? projTable? or smmActivityParentLinkTable? or in form?

    Thanks..

  • Verified answer
    Community Member Profile Picture
    on at

    You need to put the display method on ProjTable and your form is having datasource ProjTable.

    Please verify and let us know if this helps you

  • fajar Profile Picture
    3,805 on at

    I put display methods on table projTable.

    And in form is having datasource projTable, I put display methods again?

  • Verified answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    It's already described in the documentation that I linked above - please get used to reading documentation, it's an important skill for every developer.

    You have to create a new control in your form, set its DataSource property to ProjTable (or how it's the data source called) and the name of your method to the DataMethod property.

  • fajar Profile Picture
    3,805 on at

    Thanks Martin Drab..

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Sukrut Parab Profile Picture

Sukrut Parab 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans