I am using modern pages. Unfortunately, they check-in file as soon as they are uploaded. I've designed it so that they remain checked-out to user as soon as they are uploaded.
Now the reason is to make sure user fills in required metadata. However, users are being sneaky and doing 'discard check-out' which in turn checks-in the file without filling in metadata.
How can I prevent this? (without disabling discard check-out?)
Can I run a library workflow which runs when files are modified (is check-in a trigger for this?)
Can I run a site workflow to see if any file is checked in and if metadata is not filled in, then check them out for 'modified by' user?
Solved! Go to Solution.
Thanks, so question:
If I set the workflow as run when 'item is modified', would it take 'discard check-out' as an action?
When I ran it so far, it didn't trigger
How can I capture user trying to discard check-out?
Should be 4th option.
With the action you can:
Select the "Check out" state to monitor for change:
Sorry I don't have 'Wait for Check-out Status change' as it says 'Nintex external platform is required for this feature.' on the link provided.
Any other ideas?
hehe, sure you don't - they are only in on-premise.
I did it that way for O365, and it worked:
That way you will be able to track down if the document has been checked in or not.
Now if you want to check if the document has really been checked-in, I would suggest the other approach:
Thank you for the long reply. I learned a few things from there.
The core issue for me is, how can I capture if a user did a 'discard check-out'?
I tried creating a workflow and set it as 'run when items are modified' and it didn't trigger!
Another issue is, yes I can run a site-workflow using your tips to find out which ones are checked-in without filling in metadata. But then how do I check-it back 'out' for the actual user? (who last modified the file)
You can create a list workflow, that is triggered on item creation. It should capture the version of the item.
Let's assume, this is a new file - the version until user checks it in is "0".
So you should then create a variable, and calculate the version which will unpause the workflow - ex. 1.0 - that would mean, workflow is unpaused when user checks the file in. If he doesn't, the workflow stays paused.
You can create a parallel branch action and in each branch set the workflow to wait for a different value, ex. 0.1 - checked in but not published and 1.0 - checked in and published. All wrap with a state machine. Then of you move on in the 0.1 branch you can into state - "Send info to user to publish the item". If 1.0 - it the state machine and then execute your logic.
For checking in, you should use the: https://help.nintex.com/en-US/o365/o365/O365WorkFlow/WorkflowActions-INT/Office365CheckInItems.htm action, however this will not be ne on alf of a user who checked-out the file in the first place, but the app account.