Cli-microsoft365: New command: spo list view field set

Created on 11 Jan 2021  路  5Comments  路  Source: pnp/cli-microsoft365

Usage

spo list view field set

Description

Updates existing column in an existing view (eg. move to a specific position).

Options

Complete the table below with the options used on this command. A short (single character) and long version of the option should be provided along with [optional] or <required> parameters.

Option | Description
-- | --
-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 or listId but not both
--listTitle [listTitle] | Title of the list where the view is located. Specify listTitle or listId but not both
--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
--fieldId [fieldId] | Title of the view to update. Specify viewTitle or viewId but not both
--fieldTitle [fieldTitle] | The case-sensitive internal name or display name of the field to remove. Specify fieldId or fieldTitle but not both
--fieldPosition <fieldPosition> | The zero-based index of the position for the field.

| Option | Description |
| ----------------------- | ----------------------------------------- |
| -o, --option <option> | option |
| -o, --output [output] | Output type. json,text. Default text |
| --verbose | Runs command with verbose logging |
| --debug | Runs command with debug logging |

Additional Information

Respeced based on #733.
See https://github.com/pnp/cli-microsoft365/blob/master/src/m365/spo/commands/list/list-view-field-add.ts on how to move a field using the moveviewfieldto endpoint.

feature request good first issue work in progress

All 5 comments

Is fieldPosition intended to be required?

@waldekmastykarz my reasoning was that to update a field to a new position we require that position, did I mis anything and is there another way to do so?

Ah sorry, I was looking at the command name spo list view field set and assumed it allows you to do other modifications than just repositioning the field. In that context, making this option required makes perfect sense.

Hey guys, can I take this up? It's been a while since I did a command 馃槉

Awesome! All yours! Appreciate your help and glad to have you back! 馃憦

Was this page helpful?
0 / 5 - 0 ratings