================================================================================
List page with simple view using Filters property
================================================================================

page 9800 "Users List"
{
    PageType = List;
    SourceTable = User;
    
    views
    {
        view(OnlyEnabled)
        {
            Caption = 'Enabled Users';
            Filters = where(State = const(Enabled));
        }
    }
    
    layout
    {
        area(content)
        {
            field("User Name"; Rec."User Name")
            {
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (property
      name: (property_name)
      value: (identifier))
    (property
      name: (property_name)
      value: (identifier))
    (views_section
      (views_keyword)
      (view_definition
        (view_keyword)
        name: (identifier)
        (property
          name: (property_name)
          value: (string_literal))
        (property
          name: (property_name)
          value: (where_clause
            (where_conditions
              (where_condition
                field: (identifier)
                value: (identifier)))))))
    (layout_section
      (layout_keyword)
      (area_section
        (area_keyword)
        (page_field
          name: (quoted_identifier)
          source: (member_expression
            object: (identifier)
            member: (quoted_identifier)))))))

================================================================================
List page with multiple views and different properties
================================================================================

page 123 "Test List"
{
    PageType = List;
    SourceTable = Customer;
    
    views
    {
        view(ActiveCustomers)
        {
            Caption = 'Active Customers';
            Filters = where(Blocked = const(" "));
            OrderBy = ascending(Name);
        }
        
        view(BlockedCustomers)
        {
            Caption = 'Blocked Customers';
            Filters = where(Blocked = filter(<>" "));
            SharedLayout = false;
            Visible = true;
        }
    }
    
    layout
    {
        area(content)
        {
            field(Name; Rec.Name)
            {
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (property
      name: (property_name)
      value: (identifier))
    (property
      name: (property_name)
      value: (identifier))
    (views_section
      (views_keyword)
      (view_definition
        (view_keyword)
        name: (identifier)
        (property
          name: (property_name)
          value: (string_literal))
        (property
          name: (property_name)
          value: (where_clause
            (where_conditions
              (where_condition
                field: (identifier)
                value: (quoted_identifier)))))
        (property
          name: (property_name)
          value: (order_by_list
            (order_by_item
              (identifier)))))
      (view_definition
        (view_keyword)
        name: (identifier)
        (property
          name: (property_name)
          value: (string_literal))
        (property
          name: (property_name)
          value: (where_clause
            (where_conditions
              (where_condition
                field: (identifier)
                (filter_keyword)
                value: (filter_value
                  (quoted_identifier))))))
        (property
          name: (property_name)
          value: (boolean))
        (property
          name: (property_name)
          value: (boolean))))
    (layout_section
      (layout_keyword)
      (area_section
        (area_keyword)
        (page_field
          name: (identifier)
          source: (member_expression
            object: (identifier)
            member: (identifier)))))))

================================================================================
Page extension with additional view
================================================================================

pageextension 50001 "Customer List Ext" extends "Customer List"
{
    views
    {
        view(RecentCustomers)
        {
            Caption = 'Recent Customers';
            Filters = where("Date Filter" = filter('>30D'));
            OrderBy = descending("Last Date Modified");
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (pageextension_declaration
    (pageextension_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (extends_keyword)
    base_object: (quoted_identifier)
    (views_section
      (views_keyword)
      (view_definition
        (view_keyword)
        name: (identifier)
        (property
          name: (property_name)
          value: (string_literal))
        (property
          name: (property_name)
          value: (where_clause
            (where_conditions
              (where_condition
                field: (quoted_identifier)
                (filter_keyword)
                value: (filter_value
                  (string_literal))))))
        (property
          name: (property_name)
          value: (order_by_list
            (order_by_item
              (quoted_identifier))))))))

================================================================================
Views with CaptionML property
================================================================================

page 456 "Multilingual List"
{
    PageType = List;
    SourceTable = Item;
    
    views
    {
        view(InStock)
        {
            CaptionML = ENU='In Stock', ESP='En Stock';
            Filters = where(Inventory = filter('>0'));
        }
    }
    
    layout
    {
        area(content)
        {
            field("No."; Rec."No.")
            {
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (property
      name: (property_name)
      value: (identifier))
    (property
      name: (property_name)
      value: (identifier))
    (views_section
      (views_keyword)
      (view_definition
        (view_keyword)
        name: (identifier)
        (property
          name: (property_name)
          value: (ml_value_list
            (ml_value_pair
              language: (identifier)
              value: (string_literal))
            (ml_value_pair
              language: (identifier)
              value: (string_literal))))
        (property
          name: (property_name)
          value: (where_clause
            (where_conditions
              (where_condition
                field: (identifier)
                (filter_keyword)
                value: (filter_value
                  (string_literal))))))))
    (layout_section
      (layout_keyword)
      (area_section
        (area_keyword)
        (page_field
          name: (quoted_identifier)
          source: (member_expression
            object: (identifier)
            member: (quoted_identifier)))))))

================================================================================
Empty views section
================================================================================

page 789 "Empty Views List"
{
    PageType = List;
    SourceTable = Vendor;
    
    views
    {
    }
    
    layout
    {
        area(content)
        {
            field(Name; Rec.Name)
            {
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (property
      name: (property_name)
      value: (identifier))
    (property
      name: (property_name)
      value: (identifier))
    (views_section
      (views_keyword))
    (layout_section
      (layout_keyword)
      (area_section
        (area_keyword)
        (page_field
          name: (identifier)
          source: (member_expression
            object: (identifier)
            member: (identifier)))))))
