web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Lookup on field in request page

(0) ShareShare
ReportReport
Posted on by 555

Hi,

I'm new to NAV, and for the first time, I have made a request page for a new report in NAV 2009.

In the request page, the user can enter a filter on item numbers. The entered value is saved in a text variable, I use later on.

I would like to add a lookup arrow to the field, but nomatter what I do, there is no lookup arrow.

How do I make my text variable ("ItemFilter") lookup to Item."No."?

*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

    You can set the TableRelation property of this field to the Item table or you can write a custom lookup logic in the OnLookup trigger of your field. Something like:

    ItemList.SETTABLEVIEW(Item);

    ItemList.LOOKUPMODE(TRUE);

    IF ItemList.RUNMODAL = ACTION::LookupOK THEN

    BEGIN

     ItemList.GETRECORD(Item);

     Text := Item."No.";

    END;

    where:

    Item: Record "Item";

    ItemList: Page "Item List";

  • Morten Steengaard Profile Picture
    555 on at

    Hi Stefano,

    Thanks a lot for your code. I'll save that in my knowledgebase.

    It turned out that I didn't know the difference between Request Form and Request Page in NAV 2009. All my changes on the page didn't help because I used the form. Now everything works, just by setting some properties on the field in the form instead of on the field in the page.

    But I appreciate your time and work!

    Best regards, Morten

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans