Hot answers tagged

3

Yes, as per documentation: Simple versioning is available for site lists, but minor versions are not available. Each version of a list item is numbered with a whole number. If your organization requires approval of items in a list, the items remain in Pending status until they are approved by someone who has permissions to approve them. While in Pending ...


3

'Replace it' will create a new version of the file if the library has versioning enabled. You can check if the old version was retained by looking at the file's Version History.


3

I asume you are filtering by site and not by library. You could do something like this: $ignoreSites = @("http://siteurl/site1", "http://siteurl/site2") Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue $siteURL = $args[0] $site = Get-SPSite($siteURL) $webs = $site.AllWebs | ? {$_.Url -notin $ignoreSites} foreach($web in $webs) { ...


2

As mentioned here: Introduction to versioning. By default, each major version can have up to 511 drafts (minor versions) This should still hold true for SharePoint 2013.


2

Single Web: [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #get site $site = new-object Microsoft.SharePoint.SPSite("http://example.com/sitecollection/site") # get web $web = site.OpenWeb("website") # loop through all lists in web foreach ($list in $web.Lists) { # examine if BaseType of list is NOT a Document Library ...


2

I would either built a small console app using CSOM or use PowerShell and CSOM together. I haven't checked if this code works, but it probably look something like this: using (var context = TokenHelper.GetClientContextWithAccessToken(uri.ToString(), token)) { var web = context.Web; using (var fs = new ...


2

It is for all items combined in list and library. If you exceed this limit, basic file operations—such as file open or save, delete, and viewing the version history— may not succeed. Please follow this link to get more idea how it effects your sharepoint https://technet.microsoft.com/en-us/library/Cc262813.aspx


2

Yes. There could be 400k major versions and 511 minor versions apart from your current version. But the better practice would be to set a limit nonetheless. You could set something like 100, which won't be hit in years, and that would be sufficient for all practical purposes.


1

How about creating a column, maybe call it newWF as a (single line of text) and set to default value to Yes. in your wf, check the value of that column, if it is equal yes(meaning it is a new item), run your logic, but dont forget to set the column to No after you finish. if the value is no do nothing or skip. not the most elegant solution, but it works! ...


1

You can check if condition for the approval block with the workflow status hidden field. Create on hidden column called IsApproved & give default value as No At the time of new item creation inside the approval block, Update the IsApproved field as Yes In the workflow check if IsApproved equal to false then go to approval Please refer the below image ...


1

Your client side people picker is not related to the list, in order to put the value from client side people picker to the list column [AssignedTo], try to put a content editor webpart in the new/edit form with a javascript, in the javascript try using micirsoft's PreSaveAction method, in that method get the value from your client side people picker and ...


1

From Plan document versioning: When you create a new version of a document, the incremental changes are stored in SQL Server, rather than a complete new copy of the document. In depth, it's handled by Shredded Storage that covers not only versions, but all BLOBs in general. You might want to take a look at SQL queries in that article and maybe give ...


1

Found the answer here: https://community.office365.com/en-us/f/154/t/353983 Actually, a new minor version is just the incremental change from the previous version. When you create a new minor version of a document, the incremental changes are stored in SQL Server, rather than a complete new copy of the document. This provides the most efficient storage ...


1

You could use a workflow to update the second column. First capture the approval status as a variable, and when Approval Status changes, set the second column to be the variable.


1

You can get the field value of a field in a particular item version using $version.item["Field Display name"] but I think it is a read only property and you cant set it via code. https://msdn.microsoft.com/EN-US/library/office/microsoft.sharepoint.splistitemversion_members.aspx


1

Yes it does, but not to the degree at which versioning in SharePoint behaved in the past. Previously it would take copies of the file leading to massive space consumption if you didn't put limits on version retention, you could fill up your quota fast. Shredded Storage comes in two parts: part one is about getting the document to the Microsoft SQL ...


1

you can find the updated fields by comparing the actual version fields with the version fields before. Example code can be found here: http://charliedigital.com/2011/03/04/getting-version-changes-from-sharepoint/ Keep also a view on fields which are null and which contains equal strings. Hence I changed the foreach loop like this: foreach (SPField field in ...


1

Library Settings and select Versioning Settings Under Document Version History section, check the option for "Keep drafts for the following number of major versions". Enter the number of versions you want to keep. Hope this helps Reference: Click here!


1

Correct, only the current version impacts the LVT.


1

Instead of using the Relevant Documents Web Part, you could you a List View Web Part and filter the list view for the current user. Then you could easily add/remove whatever columns you want from the list view. To do this, edit the List View Web Part properties and then under Selected View click on Edit the current view. Under the Filter section, set the ...


1

Assuming that you have only major versions enabled in document library. SharePoint's default behavior is the same when you are getting the version number in REST query. The checked in version is: 6.0 After checking out it became 7.0 version. However, if you want to display the last checked in version of the file you can get that idea from ...


1

After you get the list, enable versioning. Then load the list and call execute query async


1

In O365, there is no possibility to select Version 'does not contain'. So, here is another solution. In your Document Library, create a new Calculated column Minor Version with this formula: =IF(RIGHT(Version,FIND(".",Version))=".0","Major","Minor") Then create a new view Minor Version with this filter: Show items only when the following is true: Minor ...


1

To avoid getting rid of data associated with the original file, you can open the file in "Open in Windows Explorer", then you can overwrite the file there. With a PDF, it maintains the ancillary information. CAUTION: It does NOT maintain with .doc files (which is annoying).


1

I had similar but more specific case. Needed to do some stuff for the first (and only the first) time document was approved. Here is what I did. Hope it helps someone. public override void ItemUpdating(SPItemEventProperties properties) { if (properties.AfterProperties["vti_doclibmodstat"] != null) { SPModerationStatusType ...


1

I've put together a CSS-Only way to remove this message, while keeping the status messages for other scenarios (like items or pages being checked out) visible. For starters, the markup for a customized page that is also checked out looks something like this: <div id="pageStatusBar"> <span id="status_1"> <span ...



Only top voted, non community-wiki answers of a minimum length are eligible