Skip to content

New command: spo list view add #1834

@yeshwanthjagannath

Description

@yeshwanthjagannath

Usage

spo list view add [options]

Description

Adds a new view to a SharePoint list with a set of fields.

Options

Option Description
-u, --webUrl <webUrl> URL of the site where the list to remove the view from is located
--listId [listId] ID of the list to which the view should be added. Specify either listId or listTitle or listUrl
--listTitle [listTitle] Title of the list to which the view should be added. Specify either listId or listTitle or listUrl
--listUrl [listUrl] Url of the list to which the view should be added. Specify either listId or listTitle or listUrl
--viewTitle <viewTitle> Title of the view to be created for the list
--fields <fields> Comma-separated list of case-sensitive internal- ordisplay names of the fields to add to the view
--personal View will be created as personal, if specified
--default View will be set to default, if specified
--rowLimit [rowLimit] Sets the number of items to display for the view. Default value is 30.
--paged View will be paged, if specified

Additional Information

Should be doable through the SharePoint REST API call. Below is an example:
https://{sample_site_URL}/_api/Web/Lists(guid'{sample_GUID}')/Views

Add-PnPView:
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpview?view=sharepoint-ps

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions