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)

Adding a calculated field to a form

(0) ShareShare
ReportReport
Posted on by 135

So I am tasked with adding a field to the load details form.  However, I have no idea how the current set up is, and therefore do not know how to do this.  Let me explain.

loads1.PNG

Here we see the load details form.  Notice how the load it is showing details for is noted at the top.  For this load, the "Cartons shipped:" field calculates 27 in some fashion.  I need to do something similar for my new field.  However, I cannot figure out how the "Cartons shipped" value works.  I used personalize to find the field, and it's in the WHSLoadTable.  However, the I checked that field in that table but there is no useful information.

loads3.PNG

Normally, at this point, I use cross-reference, but I didn't find anything related to the WHSLoadTable form.

loads4.PNG

So I tried looking elsewhere and found this:

loads2.PNG

It looks like the bottom method of what I circled might be what I'm looking for.  However, cross-reference doesn't show any "used by" option for these methods, so I can't figure out where they are used.  What are these methods?  It looks like they are tied to the table?  I then tried checking the control flow of initializing and running the WHSLoadTable form, and was confused by this:

loads5.PNG

What is WHSLoadTable_ds?  I cannot find that anywhere.

Anyways, this whole thing is super confusing, and while I just need to know how to add a calculated field, I still think it's worth understanding the rest of it as well.  If anyone has any knowledge, I'd greatly appreciate it!

*This post is locked for comments

I have the same question (0)
  • AXGreenHorn Profile Picture
    135 on at
    RE: Adding a calculated field to a form

    Thanks again, Satish!  I decided to go with the display method and it got the job done.

  • Verified answer
    Satish Panwar Profile Picture
    14,669 Moderator on at
    RE: Adding a calculated field to a form

    Hi AXGreenHorn,

    The field that you show in screenshot above "Cartons shipped" is static field in the table. It was custom created (based on field properties you show).

    First you need to determine do you want a static field OR display method (Static - stored in database, display method - gets calculated on fly and then show the value based on some calculations).

    Assuming you need another field like Cartons shipped, add another field in the WHSLoadTable and show it on the form. It will be blank but you will be able to see it atleast.

    Now you need to see where the load field values are calculated, you need to add your calculation at same place. For e.g. select the HALoadCartons in table and click find references. it will probably show you where this is being set. if you can't find it, try searching the application for that field. once you know how, you can do similar calculation or get an idea and then proceed with your owns calculations. once set the values will be saved in database. When you open form next, it will show up on form as well.

    Thanks,

    Satish Panwar

    Please take time to click 'Yes' against the answers that help you guide in right direction to help other community members.

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
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans