Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Filter inventSum datasource on physicalInventCalculated method

(0) ShareShare
ReportReport
Posted on by 240

I have a form where InventSum table is being used as one of the data sources. I need to remove the lines from the form where InventSum.physcialInventCalculated() is 0.

The method has the following calculation in it:

display public InventQtyPhysicalOnhand physicalInventCalculated()
{
     return this.PostedQty + this.Received - this.Deducted + this.Registered - this.Picked;

So in other words if the above-mentioned calculation equals 0 then that line of InventSum should not be displayed in the form.

Is there any way to achieve this functionality through form code?

  • Verified answer
    Hassan Akhtar Khan Profile Picture
    Hassan Akhtar Khan 240 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    I have achieved the output through following steps:

    1. Created a view for InventSum table.
    2. Added a computed column 'physicalInventCalculated' in the view and implement the same calculation in that method as the display method with the same name in InventSum table.
    3. Joined the InventSumView with InventSum table datasource in my form and applied the filter on the physicalInventCalculated field of the view.
  • Hassan Akhtar Khan Profile Picture
    Hassan Akhtar Khan 240 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    Hi Andre,

    Its "Shelf advice as of date" form in inventory management. (AOT name: PdsInventBatchShelfAdvice)

    BTW can we add 'quantity <> 0' option if it is not already available?

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    Hi Hassan,

    Which exact form do you want to apply the filter or is it a custom form?

  • Hassan Akhtar Khan Profile Picture
    Hassan Akhtar Khan 240 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    Thanks Andre for your help.

    As for your answer, I need to apply filter on the basis of some custom control, besides there is no such option available in the Dimension display settings of this form.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    Hi Hassan,

    On the Dimension display settings (button usually on all forms using data based on InventDim), there is an option to set quantities <> 0.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    I have moved it for you now.

  • Hassan Akhtar Khan Profile Picture
    Hassan Akhtar Khan 240 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    Oh sorry, posted in wrong forum.. It is related to AX 2012.

    Is there any way to change the forum or I should ask the question again in different forum?

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Filter inventSum datasource on physicalInventCalculated method

    Hi Hassan,

    You posted the question in the Dynamics 365 Finance forum and also used the tag "AX2012". What version are you using?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans