# QueryCategory Property
> Version: _Available or changed with runtime version 3.0._
Used to indicate a given query can be made available as views displayed on certain main entity lists. On queries, the QueryCategory property specifies one or more query categories that the object supports. On pages, QueryCategory specifies the query category that the page supports.
## Applies to
 Page
 Query
## Syntax
```al
query 50100 QueryWithCategories
{
    QueryType = Normal;
    QueryCategory = 'Customer', 'Items';

    elements
    {
        dataitem(DataItemName; Customer)
        {
            column(ColumnName; Name)
            {

            }

        }
    }

    var
        myInt: Integer;

    trigger OnBeforeOpen()
    begin

    end;
}
```
```al
page 50111 CustomerSourceTable
{
    PageType = List;
    ApplicationArea = All;
    UsageCategory = Administration;
    SourceTable = Customer;
    QueryCategory = 'Customer';

    layout
    {
        area(Content)
        {
            group(GroupName)
            {
                field(Name; Name)
                {
                    ApplicationArea = All;

                }
            }
        }
    }

    actions
    {
        area(Processing)
        {
            action(ActionName)
            {
                ApplicationArea = All;

                trigger OnAction()
                begin

                end;
            }
        }
    }
}
```
## Remarks
With this functionality, you can create your own queries through extensions and then have them assigned to a main list page by setting the QueryCategory property. This way you can direct users to related information based on a query even where the data is not coming from a single table.
For the syntax examples above, when page CustomerSourceTable is opened in the client, query QueryWithCategories will be available as a view. QueryWithCategories could also be used on other pages by setting the QueryCategory of the pages to either `'Customer'` or `'Items'`.
## Related information
devenv-properties
../devenv-query-object
../devenv-page-object

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-querycategory-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-querycategory-property/
