Views
Retrieves, creates, updates, or deletes views in SharePoint lists, allowing customization of displayed data. Useful for tailoring list views to specific business needs.
Table Specific Information
Views is a special table. It may be used to get, update, insert, and delete views from a specified List.
Select
To return results from Views, you must specify either the ID or List column in the SELECT statement.Sample Queries
Using the List column:
SELECT * FROM Views WHERE List = 'MyListName';
Using the ID column:
SELECT * FROM Views WHERE ID = 'list1|{24676099-47E8-4C07-BABE-47EB9BEBA2F9}';
Insert
The List, Name, and Fields columns are required to insert to this table.
Columns
| Name | Type | ReadOnly | Description |
| ID [KEY] | String | True |
A unique identifier for the view. Used to reference and manage specific views in SharePoint. |
| List | String | True |
The name of the list associated with the view. A list must be specified in SELECT statements if the view ID is not provided. |
| ViewID | String | True |
The unique identifier of the view within a specific list. Useful for managing multiple views within a list. |
| Name | String | False |
The display name of the view. Helps users easily identify and select views. |
| Type | String | False |
The type of view, such as Standard, Calendar, or Datasheet. This value is required for inserts and updates. The allowed values are CALENDAR, GRID, HTML. The default value is HTML. |
| Fields | String | False |
A comma-separated list of fields included in the view. Space-sensitive; ensure proper formatting for queries. |
| IsDefault | Boolean | False |
Indicates whether the view is the default view for the list. Helps determine the primary view for users. |
| Query | String | False |
The query used to filter or sort data in the view. Helps customize list display based on specific conditions. |