New answers tagged

0

Write-Host -f Green "Adding Content Type to Document set: DocumentsetName" Add-SPOContentTypeToDocumentSet -DocumentSet "DocumentsetName" -ContentType "picture" Use SharePoint Online PnP https://github.com/OfficeDev/PnP


1

Good to see more CSR questions In View (and only in a View!) CSR code, the function actually gets 4 parameters. So you can write: View: function(ctx, CurrentFieldSchema, CurrentItem, ListSchema) { return String.format("{0} ({1})",CurrentItem.FileLeafRef,CurrentItem.ItemChildCount) }, The for loop in Daniels answer can be shortened with standard ...


0

You don't have to use REST to show the item count inside parentheses behind the name. Add the Item Child Count Column to the view and use the following CSR: SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { function getBaseHtml(ctx) { return SPClientTemplates["_defaultTemplates"].Fields.default.all.all[ctx....


1

There is a OOTB column for that. Edit the view and select the Item Child Count. This column display the number of files and folders in a document set or folder. If you don't like the column name, you can add a script editor web part to the page and add this code to manipulate the fields name. <script type="text/javascript"> window.onload=...


1

You will need to break the URL apart. The item url is basically list/folder[x]/item. Credits to Bunzab



Top 50 recent answers are included