Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Filter Records

(0) ShareShare
ReportReport
Posted on by 3,061

Hi

  How to setfilter records which Have Document Type 0 or 1 in Vendor Ledger Entry

Thanks

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Filter Records

    We don't know what are the document types that you want to filter, but the solution is what we have provided in this post. I'll retry to explain:

    If you want to filter for the FIRST and SECOND option values and the option values for Document Type are, BLANK,Payment,Invoice you can write:

    VendorLedgerEntry.SETFILTER(“Document Type”,’%1|%2’,VendorLedgerEntry.”Document Type”::" ",VendorLedgerEntry.”Document Type”::Payment);

  • jsshivalik Profile Picture
    jsshivalik 3,061 on at
    RE: Filter Records

    Hi

     I don't want to pass Integer . In Option String it is written

    ,Payment,Invoice

    At 0 there is nothing . Payment = 1 , Invoice = 2

    Thanks

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Filter Records

    Check the option String and pass the integer value

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Filter Records

    The first option value you have in Document Type field options (I don’t remember now what value is). Check the OptionString property of this field.

  • jsshivalik Profile Picture
    jsshivalik 3,061 on at
    RE: Filter Records

    Hi

     What should be written if 0 to be considered

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Filter Records

    Yes you can write the option name. Mine was only a sample.

  • jsshivalik Profile Picture
    jsshivalik 3,061 on at
    RE: Filter Records

    Hi

     It is giving me message 'A variable was expected'

    VLE.SETFILTER("Document Type",'%1|%2',"VLE"."Document Type"::0,"VLE"."Document Type"::1);

    Instead of numeric can't we write like 'Payment' etc. What is to be written for 0

    Thanks

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Filter Records

    VendorLedgerEntry.SETFILTER(“Document Type”,’%1|%2’,VendorLedgerEntry.”Document Type”::0,VendorLedgerEntry.”Document Type”::1);

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans