import Global from '../../_global.mdx';
Updates existing column in an existing view (eg. move to a specific position)
m365 spo list view field set [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 either `listId`, `listTitle`, or `listUrl`.
`--listTitle [listTitle]`
: Title of the list where the view is located. Specify either `listId`, `listTitle`, or `listUrl`.
`--listUrl [listUrl]`
: Server- or site-relative URL of the list. Specify either `listId` , `listTitle` or `listUrl`.
`--viewId [viewId]`
: ID of the view to update. Specify `viewTitle` or `viewId` but not both
`--viewTitle [viewTitle]`
: Title of the view to update. Specify `viewTitle` or `viewId` but not both
`--id [id]`
: ID of the field to update. Specify `id` or `title` but not both
`--title [title]`
: The **case-sensitive** internal name or display name of the field to update. Specify `id` or `title` but not both
`--position <position>`
: The zero-based index of the position to which to move the fieldMove field with ID 330f29c5-5c4c-465f-9f4b-7903020ae1ce to the front in view with ID 3d760127-982c-405e-9c93-e1f76e1a1110 of list with ID 1f187321-f086-4d3d-8523-517e94cc9df9 located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view field set --webUrl https://contoso.sharepoint.com/sites/project-x --listId 1f187321-f086-4d3d-8523-517e94cc9df9 --viewId 3d760127-982c-405e-9c93-e1f76e1a1110 --id 330f29c5-5c4c-465f-9f4b-7903020ae1ce --position 0Move field with title Custom field to position 1 in 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 set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --viewTitle 'All Documents' --title 'Custom field' --position 1Move field with title Custom field to position 1 in view with title All Documents of the list with url /sites/project-x/lists/Events located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view field set --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/lists/Events' --viewTitle 'All Documents' --fieldTitle 'Custom field' --fieldPosition 1Move field with title Custom field to position 1 in view with title All Documents of the list with site-relative URL /Shared Documents located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view field set --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/Shared Documents' --viewTitle 'All Documents' --fieldTitle 'Custom field' --fieldPosition 1The command won't return a response on success.