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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Rearranging columns in a Query

(0) ShareShare
ReportReport
Posted on by 260

Hi Members,

I need to arrange the columns in a query which are fetched from multiple tables in Business Central. For instance, consider a scenario where I am using 3-4 tables in Business central and fetching datas in the same way which I had entered in the query page. But when I am doing so, I am not able to get or able to arrange the columns in an orderly way which I actually needed.

Please suggest me a solution to the current issue that I am facing.

Thanks & Regards,

Saravanan M

  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    I will open this up to the community in case they have something to add.

  • Suggested answer
    YUN ZHU Profile Picture
    103,103 Super User 2026 Season 2 on at

    Hi, Generally for Query, you can use the OrderBy Property to sort table fields in the page view in ascending or descending order.

    If this does not meet your needs, I suggest you create a page to display the data of this Query, which can do more things. more details: https://yzhums.com/4869/

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-orderby-property

    For examlpe,

    query 50100 "ZY Purchase Order Query"
    {
        Caption = 'ZY Purchase Order Query';
        OrderBy = Descending(Buy_from_Vendor_No_);
        QueryCategory = 'Vendor List', 'Purchase Order List';
    }


    Hope this helps.
    Thanks.
    ZHU
  • M Saravanan Profile Picture
    260 on at

    Dear Yunzhu,

    Thank you for your reponse. I would like to inform you that I already went through your blog related to the 'Query Category'. It was very helpful and a great guidance to my learning. But, here the scenario goes like, arranging the columns fetched from various tables in Business Central through Query. For example, consider that I am taking three tables.. i.e Sales Invoice, Sales Invoice Header, Sales Invoice Line. Consider a situation that I am choosing around 10 fields from each table and writing a query. When the Query page is executed, I could find all the fields that I had mentioned in the query retrives with value. Now I wish to change the order or position of the columns(fields) accordingly (For Ex., Sales order number, Sales order document number, Item number, Item Description, Quantity, Price etc.) to establish a pleasing view (between the fields that are related with one another) who runs the query. 

    Please suggest me an alternative solution to the current scenario.

    Thanks and Regards.

    Saravanan M 

  • Suggested answer
    Amit Profile Picture
    2,563 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 748 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 354 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 351 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans