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 64,563 Super User 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,722 Super User 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans