Our requirement is that we need to populate expiry date only on major version document check in. In our library "Required check out" option is enabled.
Below is the workflow steps we have created:
1. Wait for checkout status change (After check in we need to trigger the workflow)
2. If version contain ".0"
3. Set field "Expiry date" to Modified + 3 years else retain the old value
4. Stop the workflow
But the above workflow ran into an error "Field cannot be updated. Item needs to be check out"
Kindly suggest some solution to achieve the requirement.
Solved! Go to Solution.
As the error indicates, for an update of the associated Expiry Date field, you will have to:
This behaviour is standard SharePoint behaviour and you will come across it when trying to update items manually as well as updating them using other tools or even code.
There's a problem with your method: After your users checked in a major version, you're modifying a field so in fact you're creating a new version again.
Wouldn't it be possible to have the expiration date in a calculated column which adds 3 years to the modified date (see http://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx) if the version is a major version? Just a thought, never tried it tough.. :-)
Fair comment Martin however if you use the "Office 365 check in items" action rather than the "Check In Item" action you can check the document/item in without a version change (there is a selection called "Check in type").
The calculated column might be an easier option. But keep in mind that you'd have to check on the version number in the formula (not sure if that is possible, never tried) to ensure the date only changes if it is a major version. If that version check is not possible through a formula then the date would change no matter whether the version is a major or minor version
We have tried with calculated column. Checking the major version works fine but if the version is not major version then we are not able to retain the old value .
Formula we used:
=IF(FIND(Version,".0"),Modified+5,here we have to retain the old value)
We tried your options.. The workflow works fine in sharepoint on premise, but for sharepoint online the option "Wait until checkout status change" is not available. Currently we are using nintex workflow trial pack ..
Is this option removed in sharepoint online version? or because of trial pack this option is not coming up?
The action "Wait until checkout status change" is currently not available in Office 365 but will be added soon. The Office 365 products are rather new (just over a year) and needed to be built from the ground up. You will notice over the next few months that there will be more and more actions available to you in O365.