Currently, with the spo list view set command, you can :
--fieldId / --fieldTitle (ID or Title not both)--viewId / --viewTitle (ID or Title not both)-u, --webUrl Web URL--fieldPosition value : [integer only] (if value is out of bound, the position will be the last available)Combined to
spo list view listthat will be possible to update all views of specific list
Note : I didn't understand the usage of
--updateExistingListsparameter 馃槚 If anyone can tell me a little more...
For simplicity, I'd suggest we split this spec into multiple commands, eg. spo list view field add to add a column to an existing view, spo list view field remove to remove it. As for changing the order, perhaps extending spo list view set would make the most sense.
Ok, that's make sense.
I'll split this issue !
Are you agree with the fieldPosition parameter ?
Just to check if I understand your proposal correctly. To change the order of a field in the view you would call:
o365 spo list view set --webUrl https://contoso.sharepoint.com --listTitle MyList --viewTitle MyView --fieldTitle MyField --fieldPosition 3
It would work, if you wanted to change the order of one field. It could quickly get complicated though, if you wanted to change the order of multiple fields. Let's start with this implementation and we can extend it in the future if need be to allow reordering all fields.
Yes, we can extend the order management for several columns through JSON for example
Let's ship the above first and then add support for several columns as a separate enhancement.
@waldekmastykarz
Since we're adding the cmdlet spo list view field add, do you want to conserve the spo list view field set with the same parameters ? Because the target is the same, that made a doublon, isn't it ?
Sorry, I don't understand what you mean @Laul0 馃槉
We had planned to add the capability of list view set cmdlet to add a column.
We had planned to add cmdlet list view field add that allow to add a column to a view.
The purpose is the same, isn't it ?
Understood. Looking at both commands we should have:
list view field add - to add a column to an existing viewlist view field set - to update a column in an existing view (eg. move to a specific position)list view set - update view properties (title, description, etc.)Hey @Laul0 are you still working on this?
I have to finish my spec for spo list view field add and I'll work on it
Hey @Laul0, did you have a chance to pick this up or should we let others chime in?
Hi @waldekmastykarz, I'm finishing the mail send cmdlet first and I'll work on it.
Sorry for the delay, it is a period of holiday and family.
However, if someone else want to work on it, to be quicker, he is welcome
No problem! I'll reset this command as available for picking and you can always take it back when you have time.
Create a new spec for the last remaining issue #2059.
Commands that are already updated in the CLI are:
spo list view field addlist view set