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 NAV (Archived)

Adding custom filters to the request form NAV Classic

(0) ShareShare
ReportReport
Posted on by

So I have a report that generates a column "Qty. Available" and would like to create a custom filter that filters a range of the amount in that column. Not really sure where to start. Can anyone help?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,241 Super User 2025 Season 2 on at
    RE: Adding custom filters to the request form NAV Classic

    Do you want to apply filter on that column ? From the request form you can apply the filter or the specified data item in the code on Pre-data Item you can apply the filter using SETFILTER or SETRANGE

  • Community Member Profile Picture
    on at
    RE: Adding custom filters to the request form NAV Classic

    Yes I would like to place the filter on that column but on Item OnAfterGetRecord( )

    IF QtyAvailFilter <> '' THEN

    SETRANGE("Qty. Available", QtyAvailFilter);

    This is what I have but It's not working. Also I would like it to be just a >= a certain amount.

    Very new to this. Just started last month.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,241 Super User 2025 Season 2 on at
    RE: Adding custom filters to the request form NAV Classic

    Please let us know the report no. There is no column in the table Item called Qty. Available, the actual field is Inventory

    If you are referring the Inventory Field on the Item table then that is a flow field for that you need to use onaftergetrecord something like below

    CALCFIELDS(Inventory);

    IF Inventory >= QtyAvailFilter THEN

    CurrReport.SKIP

  • mmv Profile Picture
    11,471 on at
    RE: Adding custom filters to the request form NAV Classic

    Hi,

    Is the "Qty. Available" a customized field in the Item table?

  • Community Member Profile Picture
    on at
    RE: Adding custom filters to the request form NAV Classic

    Yes. It's part of a custom report that is calculated with this:

    Inventory - "Qty. on Sales Order"

  • Verified answer
    Suresh Kulla Profile Picture
    50,241 Super User 2025 Season 2 on at
    RE: Adding custom filters to the request form NAV Classic

    If your custom field is not a flow field then apply the filter onpredataitem

    SETFILTER("qty. available",'>=%1',qtyavailfilter);

  • Community Member Profile Picture
    on at
    RE: Adding custom filters to the request form NAV Classic

    What if I was looking for a <= to? Client just asked that they would like to go < as well.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,241 Super User 2025 Season 2 on at
    RE: Adding custom filters to the request form NAV Classic

    Yes you can change it. I thought it was >

  • Community Member Profile Picture
    on at
    RE: Adding custom filters to the request form NAV Classic

    Thank you everyone for your support. I greatly appreciate your 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

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans