spo list view field add¶
Adds the specified field to list view
Usage¶
m365 spo list view field add [options]
Options¶
-u, --webUrl <webUrl>
- URL of the site where the list is located
--listId [listId]
- ID of the list where the view is located. Specify
listTitle
orlistId
but not both --listTitle [listTitle]
- Title of the list where the view is located. Specify
listTitle
orlistId
but not both --viewId [viewId]
- ID of the view to update. Specify
viewTitle
orviewId
but not both --viewTitle [viewTitle]
- Title of the view to update. Specify
viewTitle
orviewId
but not both --fieldId [fieldId]
- ID of the field to add. Specify
fieldId
orfieldTitle
but not both --fieldTitle [fieldTitle]
- The case-sensitive internal name or display name of the field to add. Specify
fieldId
orfieldTitle
but not both --fieldPosition [fieldPosition]
- The zero-based index of the position for the field
-h, --help
- output usage information
--query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Examples¶
Add field with ID 330f29c5-5c4c-465f-9f4b-7903020ae1ce to view with ID 3d760127-982c-405e-9c93-e1f76e1a1110 of the list with ID 1f187321-f086-4d3d-8523-517e94cc9df9 located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view field add --webUrl https://contoso.sharepoint.com/sites/project-x --listId 1f187321-f086-4d3d-8523-517e94cc9df9 --viewId 3d760127-982c-405e-9c93-e1f76e1a1110 --fieldId 330f29c5-5c4c-465f-9f4b-7903020ae1ce
Add field with title Custom field to view with title All Documents of the list with title Documents located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view field add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --viewTitle 'All Documents' --fieldTitle 'Custom field'
Add field with title Custom field at the position 0 to view with title All Documents of the list with title Documents located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view field add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --viewTitle 'All Documents' --fieldTitle 'Custom field' --fieldPosition 0