Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Filtering Records

Posted on by 3,027

Hi

  I have below code . I want those records which have +ve adjustment but consumption type should not be Export And Import. It is summing those records also which have Export & Import.


ILE[9].SETFILTER(ILE[9]."Entry Type",'%1',ILE[9]."Entry Type"::"Positive Adjmt.");
ILE[9].SETFILTER(ILE[9]."Consumption Type",'<>%1|<>%2',ILE[9]."Consumption Type"::Export,ILE[9]."Consumption Type"::Import);
IF ILE[9].FINDFIRST THEN REPEAT
  Qty[9] += ILE[9].Quantity;
UNTIL ILE[9].NEXT=0;

Thanks

*This post is locked for comments

  • Verified answer
    RobertasR Profile Picture
    RobertasR 5,002 on at
    RE: Filtering Records

    It should probably be '&' instead of '|'

    ILE[9].SETFILTER(ILE[9]."Consumption Type",'<>%1&<>%2',ILE[9]."Consumption Type"::Export,ILE[9]."Consumption Type"::Import);

    Robertas

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

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