SharePoint Document Management with Automated Versioning

preview_player
Показать описание
Edit: There is a missing part in the video, where it looks like I have cut out the varEnding & GetFileNameOnly compose action. Sorry about that, here are the missing parts:

Set Variable - varEnding: substring(triggerOutputs()?['body/{FilenameWithExtension}'],outputs('Compose_-_GetDotPosition'))

Compose - GetFileNameOnly: substring(triggerOutputs()?['body/{FilenameWithExtension}'],0,outputs('Compose_-_GetUnderscorePosition'))

In this video, we will explore another solution of #uploading #documents into a #sharepointonline Library. The challenge this video is trying to overcome is that when the same document is uploaded (name-wise), the document will be replaced. But what if we have changed the content and we need the document to exist as a new version of the one that's already there? The user would have to rename the document by themselves and copy the metadata of the older version to the new one, although they have not changed it.

The solution I came up with uses two SharePoint Online Folders in a Library. One is for uploading the documents and it will be emptied every time the document has been moved to the final destination folder. The other one is the final destination folder of the documents. The user will upload the document in the Upload Folder and when they are finished updating the metadata, a column called "MoveFile" (Yes/No column) can be set to Yes, the Trigger Condition of the Workflow will be met and the workflow will start running.

The workflow will check if the document already exists in the final destination folder, if not it will copy the file to the folder and delete it from the upload folder. Here you can also use a move file action, up to you :)
If the document does exist in the final destination folder, the workflow will count the documents that start with the same name. If for example the length of the "Get Files" action is 3, then the newly uploaded document will receive a new version number in the file name "Document_004".

Feel Free to follow me on other social media platforms as well:

Рекомендации по теме
Комментарии
Автор

You did't show the part of (Set variable - varEnding) and (Compose - GetFileNameOnly)..

tugbadeniz