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)

Filter bincode lookup field using bin

(0) ShareShare
ReportReport
Posted on by 200

bincode lookup fields gets the data from bincontents page. But it needs to be filered from a Boolean field name 'block' if its false from bin page. bincode is common for both bin and bincontents page.

Following is my code. but doesn't work. can anyone suggest? Thanks in Advance

Bin1.RESET;

Bin1.SETRANGE("Location Code",LocationCode);

Bin1.SETRANGE(Blocks,FALSE);

IF BinContent.FINDSET THEN

REPEAT

BinContent.SETRANGE(BinContent."Item No.",ItemNo);

Bin1.SETRANGE(Code,BinContent."Bin Code");

BinContent.SETRANGE("Bin Code");

UNTIL BinContent.NEXT = 0;

IF PAGE.RUNMODAL(0,BinContent) = ACTION::LookupOK THEN

EXIT(BinContent."Bin Code");

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Filter bincode lookup field using bin

    This code doesn't work for sure.

    Do you want to filter BinContent for all the Bins that have Blocks = FALSE?

    You can do this by using MARKS or simply by adding a FlowField in the BinContect Table.

    In the BinContent table, add a flowfield called Bin Blocks defined as Lookup(Bin.Blocks WHERE (Location Code=FIELD(Location Code),Code=FIELD(Bin Code))).

    Then, in your lookup:

    BinContent.SETRANGE(BinContent."Item No.",ItemNo);

    BinContent.CALCFIELDS("Bin Blocks");

    BinContent.SETRANGE("Bin Blocks",FALSE); //TRUE or FALSE depending on the filter you want to apply

    IF PAGE.RUNMODAL(0,BinContent) = ACTION::LookupOK THEN

    ......

  • anandb313@gmail.com Profile Picture
    200 on at
    RE: Filter bincode lookup field using bin

    Its Working..!!! Thank you very much Stefano

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans