Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Adding custom filters to the request form NAV Classic

Posted on by Microsoft Employee

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

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

    Thank you everyone for your support. I greatly appreciate your time.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 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
    Community Member Microsoft Employee 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.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 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
    Community Member Microsoft Employee 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"

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

    Hi,

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

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 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

  • Community Member Profile Picture
    Community Member Microsoft Employee 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
    Suresh Kulla 43,745 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans