Cli-microsoft365: Add 'spo list view add' command

Created on 4 Jan 2019  路  6Comments  路  Source: pnp/cli-microsoft365

Summary

Add a support for spo list view add command in order to :

  • [ ] Add/create a view to a target list located to a specific site
  • [ ] Here the list of necessary parameters :

    • [ ] --listId / --listTitle (ID or Title not both)

    • [ ] -u, --webUrl Web URL

    • [ ] --title title of the new view

    • [ ] --query a valid CAML Query

    • [ ] --fields list of fields to add to the new view (keep order). Ex : field1, field2

  • [ ] Support at least the following additional parameters :

    • [ ] -o, --output

    • [ ] --verbose

    • [ ] --debug

First step, juste add new view. After that, add additional parameters like schema or something like that for more flexibility :

  • --Paged
  • --RowLimit
  • --SetAsDefault set to false by default
  • --ViewType
  • --personal set to false by default

To Do

  • [ ] Add command from solution
  • [ ] Add documentation of usage (MkDocs)
  • [ ] Validate cmdlet usage
  • [ ] Validate Unit test
needs design new feature

All 6 comments

Without the ability to specify the query and fields, this commands adds little value, because when you create a view, you want it to be custom. The first version of the command should support the basic capabilities like specifying fields, query and limit. Things like paging and personal could be set in the second phase if require significant effort. Otherwise, let's add them in one go.

I agree !
I thought do simple for a first step. Because currently, if someone wish create a new view to provide custom formatter (for example), this people will can't do that.
Add field in to existing view is an improvement already noted. So, add view + add field to view can answer a basic need.

(thx for the title correction)

Being able to apply a formater is definitely useful, but it relies upon being able to select the right data and for that we need to be able to specific the basics like query, sorting and fields. Let's include them in the first version and we can then extend it with more options in the next run.

What do you mean by 'sorting' ? Columns sorting ?

Sorting as in, specifying the order of the data displayed in the view. Not sure off the top of my head if this is a part of the query or if it's a separate property.

Close this one because of duplicate #1834

Was this page helpful?
0 / 5 - 0 ratings