Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

DropDown

Posted on by 3,027

Hi

  I have a G/L Entry filter in Request Page in report. DropDown List appears . I want first record field should be displayed by default.

Thanks

*This post is locked for comments

  • ManishS Profile Picture
    ManishS 6,578 on at
    RE: DropDown

    Hi jsshivalik,

    Are you new to NAV ?

    1. You need to find the first location.

    2. Then assign it to a global variable.

    3. Show that global variable on the request page.

    4. Then write code to check if this global variable has a value then filter your GL entries.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

       It is not a variable. It is G/L Entry Filter Location Code . How to assign default value to it.

    Thanks

  • mmv Profile Picture
    mmv 11,465 on at
    RE: DropDown

    Do you have "Location Code" in "G/L Entry"?

    "G/L Entry.SETFILTER("Location Code",LocationRec.GETFILTER(Code));

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

       It is a Filter Location Code . How i can assign default value . It is not a variable

    Thanks

  • mmv Profile Picture
    mmv 11,465 on at
    RE: DropDown

    IF LocationRec.FINDFIRST THEN

      yourVariable := LocationRec.Code;

    yourVariable is a variable of type Code 10;

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

      I am trying like this . How to assign a value to G/L Entry Filter Location code

    OnOpenPage()

    IF LocationRec.FINDFIRST THEN BEGIN

     "G/L Entry".GETFILTER("G/L Entry"."Location Code") = LocationRec;

    END;

    Thanks

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: DropDown

    Hello,

    Please think and try to add some code, it is very basic. You need get the Locations Record find the first record and assign the value to the variable.  Try something out and we will help you to correct it.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

        ON the field in request page Locations dropdown appears. I want value of first record should appear by default in that field when page appears. User may not require to selecct value by clicking on DropDown.

    Thanks

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

     Can u pls provide some sample code .

    THanks

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

         There is no code. Just Filters are selected. On the field in G/L Entry table Table Relation is given. Location.Code . So Locations appear in the dropdown . I just want that field value from the first  record in that list should be displayed as default.

    Thanks

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans