Living a SharePoint life

Friday, March 15, 2019

Setting SharePoint View properties with the PnP-Framework

The PnP-Framework has made a lot of task easier when taking care of a SharePoint environment. However, the documentation is still… ehem, let’s say developer friendly. In this article I’ll take a look at the Set-PnPView cmdlet and what values can be configured and why.



Looking into the cmdlet Set-PnPView doesn’t offer very much InSite how to use the command nor what values can be set. The Github page isn’t of much help either. The parameter List and Identity are obvious how to use them. What really is missing is some sort of information what properties go into the hashtable that is submitted with Values.

First, we need to understand what properties of a view can be set. I choose a list on my development SiteCollection and look for the available views on a random list. By using Get-PnPView I get a list of the views in return.


What properties can be set, can be evaluated by looking at the details returned.


What we are interested in here are the members of the object return from the cmdlet.


Not all properties implement a setter and thus cannot be modified directly. However, there are still a lot of other properties that can be changed:

Aggregations
AggregationsStatus
ColumnWidth
ContentTypeId
CustomFormatter
DefaultView
DefaultViewForContentType
EditorModified
Formats
Hidden
IncludeRootFolder
JSLink
ListViewXml
Method
MobileDefaultView
MobileView
NewDocumentTemplates
ObjectVersion
Paged
RowLimit
Scope
TabularView
Tag
Title
Toolbar
ViewData
ViewJoins
ViewProjectedFields
ViewQuery
VisualizationInfo
If you wish to change the title of the view you can use the following command:

Set-PnPView -List $list -Identity [GUID] -Values @{Title="My new view title"}
For more details on the properties take look at the Microsoft SharePoint documentation at MSDN or search for TypeName: Microsoft.SharePoint.Client.View.
https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ee541537(v=office.15)

Keep in mind that these properties are valid for the old SharePoint view style and not all functions are yet implemented in modern pages.

18 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles . hop over to this web-site

    ReplyDelete
  3. Interesting and amazing how your post is! It Is Useful and helpful for me That I like it very much, and I am looking forward to Hearing from your next.. egypt rental property

    ReplyDelete
  4. Try not to value your property in front of the common market rates. Be available to various offers and think about the advantages and disadvantages of each offer. You can likewise look for your realtor help prior to striking the arrangement. NW Calgary homes for sale

    ReplyDelete
  5. With these projections set up, we can start to bits together the pay proclamation and the accounting report.Sell house Ireland

    ReplyDelete
  6. In the event that you have 2 to 3 inhabitants who continually change the temperature of the cooled properties, this can broil your cooling unit. Exuma Real Estate

    ReplyDelete
  7. Fabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. 3 bedrooms flat for sale in Ikeja Nigeria

    ReplyDelete
  8. The property estimation line will essentially extend the worth of the property after some time. Emergency Tree Service Stockton

    ReplyDelete
  9. A few lines beneath our "All out Capital Needed," we should make a capital sources box. This crate will have six sections with the headings: source, sum, % price tag, rate, term and yearly installment. Two ordinary wellsprings of capital for getting a property are a home loan and a value credit extension (or advance). Our last wellspring of capital (for this model at any rate) will be our own money or value. nova city housing society islamabad payment plan

    ReplyDelete
  10. There is a note pack to know about this. I assume you scored some good points in the features as well. Faisal hills Islamabad

    ReplyDelete
  11. Tree evacuation experts ought to be reached for the majority of these tasks as a result of what could turn out badly simultaneously. Stump Removal Irvine, CA

    ReplyDelete
  12. Trees need to be removed especially when a storm has hit and caused the tree to fall down. Tree Removal company Albuquerque

    ReplyDelete
  13. It would be incredible if the US inhabitants clean the channels. Tragically, they don't. On the off chance that that occurs, your cooling frameworks get wear out. plot for sale in university town islamabad

    ReplyDelete
  14. We can give every tab a name that portrays the data contained in it. Thusly, different clients of the model can more readily get where information is determined in the model and how it streams.
    Tajarat strives to be Pakistan's biggest real estate developer ever, guaranteeing the highest international standards, prompt execution, and lifetime customer loyalty. For further detail visit
    university town plot for sale

    ReplyDelete
  15. Great thanks for sharing this article post. Really thank you! Keep writing.
    Safe Tree Removal Austin

    ReplyDelete
  16. Incredible article distributed here by you. I have long been eager to adapt new things in relation to this topic, and there is no doubt that I have adapted new things today. blacktown driving school

    ReplyDelete
  17. Many thanks ...... Because of Imarah Marketing I booked my own home in Islamabad No doubt, the best Property Dealer in Gulberg. I will recommend your service to everyone buying land in Islamabad!
    https://imarahmarketing.com/
    https://imarahmarketing.com/blue-world-city/
    https://imarahmarketing.com/park-view-city-islamabad/

    ReplyDelete
  18. Amazing and Helpful post. I really appreciated your work.Many thanks for your kind and efficient service for booking a plot in park view city and blue world city.I will definitely recommend Imarah real estate services to others in the future.
    https://imarahmarketing.com/
    https://imarahmarketing.com/blue-world-city/
    https://imarahmarketing.com/park-view-city-islamabad/

    ReplyDelete

Featured Post

The Retro Powershell - Looking good in 8-Bit | Part 1

I wrote a little script that, when placed in your PowerShell Profile, will print a message similar to the old boot message you got from you...