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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

filter datasource in form

(0) ShareShare
ReportReport
Posted on by

hi everyone.

this may sound a bit silly but I can't find anything close to what i need to do.

I've created a form with purchline table as the data source and i need to filter by PurchQty field, excluding records that equal to certain add:

basically, I need to only show the record that fulfills this request:

PurchLine.PurchQty != (QtyPurch + PurchLine.RemainPurchPhysical)

where qtyPurch is a calculated field from other tables.

I've done some research in forums but I can only find the opposite result, adding the next line in the executequery method from the data source:

this.query().dataSourceTable(TableNum(PurchLine)).addRange(fieldNum(PurchLine,PurchQty)).value(queryValue(qtyPurch + PurchLine.RemainPurchPhysical));

which return as a said the opposite of what I'm trying to achieve (PurchLine.PurchQty == (QtyPurch + PurchLine.RemainPurchPhysical))

I've found other options to add two value ranges like value == v1 or value == v2 but nothing to compare !=, <, >

is there anyway to do this directly on the datasource?

I hope I made myself clear, if you need more information please let me know.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    that was my first logical option but since i'm not doing a direct comparison i wasn't sure how the sintaxis could be,

    anyway, this:

    QBR.value(strfmt('(purchQty != "%1")',queryvalue((Purchline.receivedInTotal()+purchline.RemainPurchPhysical))));

    is not working either, i'm not sure if the function is returning the value it should and debugging is not been very helpful this time.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans