Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Find the item with the largest number of entries

(0) ShareShare
ReportReport
Posted on by

Hi!!! I have a problem with my task. I have 4 entries in my table, and I need to find the most popular ones (those with the same ID), in my case it's an entry with (ID 501 MERCEDES - 3 rec). I need to show a message something like: The most popular record with ID 501. when I start the table. Can You explane how to do it? I`m new in navision development. Thanks!

4186.Untitled.jpg

*This post is locked for comments

  • Binesh Profile Picture
    7,885 on at
    RE: Find the item with the largest number of entries

    Hello Serega,


    If mentioned solutions helped you then mark answer is verified, so other members will be benefited 

  • Community Member Profile Picture
    on at
    RE: Find the item with the largest number of entries

    Thanks! after little modifying your code/logik started to work

  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at
    RE: Find the item with the largest number of entries

    Do you HAVE to do it inside NAV? And does the result need to be displayed as a Report? A Page? Tools like Excel/PowerPivot or Power BI will do this in minutes by pivoting and showing the count of records per ID or sum of Total Revenue or Cost of Sales per Item ID.

  • Verified answer
    Binesh Profile Picture
    7,885 on at
    RE: Find the item with the largest number of entries

    Hello Serega

    You have to write your custom logic in any Page Action or Codeunit.

    best idea is create a secondary key of field that you want to check, and sort the records.

    for reference purpose see below code, its just for reference not your whole solution.

    0121.1.png

  • Mouli Kaku Profile Picture
    517 on at
    RE: Find the item with the largest number of entries

    Hi Serega, create a flow field on item(where you would like to show ) for count with id filter on those entry table . so whenever you open item list it will calculate no of entries on item card, if you like it in sorting order then flowfield won't work. 

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans