Usage
spo list view add [options]
Description
Adds a new view to a SharePoint list with a set of fields and providing the viewQuery.
Options
Would leverage the existing set of options and add :
| Option |
Description |
| --viewQuery |
Xml representation of the list query for the underlying view |
Additional Information
A simple POST to an existing view could be done using the following pseudo-code :
POST "/_api/web/lists/getByTitle('List Name')/views/getByTitle('ListViewName')"
Content-Type: application/json
{
'__metadata': {
'type': 'SP.View'
},
'ViewQuery': '<OrderBy><FieldRef Name=\"ID\" /></OrderBy><Where><Eq><FieldRef Name=\"ColumnName\" /><Value Type=\"Text\">ValueofColumn</Value></Eq></Where>'
}
Usage
spo list view add [options]
Description
Adds a new view to a SharePoint list with a set of fields and providing the viewQuery.
Options
Would leverage the existing set of options and add :
Additional Information
A simple POST to an existing view could be done using the following pseudo-code :