Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Query as a smart list - how to get Top Number Of Rows?

Posted on by 102

Hi. I add in my query parameter 'TopNumberOfRows = 10'. Unfortunatelly - Smart List based on this query display more results than 10. Can I get only top10 records?

And second question - in Smart List I can only use filters 'inside' Query object? I can't filter this list from other objects/files?

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,639 Super User 2024 Season 2 on at
    RE: Query as a smart list - how to get Top Number Of Rows?

    Hi, here is a simple example from MS.

    Query.TopNumberOfRows([Integer]) Method - Business Central | Microsoft Learn

    pastedimage1666228343076v1.png

    Hope this helps.
    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at
    RE: Query as a smart list - how to get Top Number Of Rows?

    TopNumberOfRows should work if done properly.

    Maybe you can share your code?

    learn.microsoft.com/.../topnumberofrows-function

    There should also be plenty of filtering options both inside the object and on the query result.

    learn.microsoft.com/.../devenv-query-overview

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans