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)

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

I have the same question (0)
  • Mouli Kaku Profile Picture
    517 on at

    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. 

  • Verified answer
    Binesh Profile Picture
    7,885 on at

    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

  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at

    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.

  • Community Member Profile Picture
    on at

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

  • Binesh Profile Picture
    7,885 on at

    Hello Serega,


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

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)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans