[ProjectCasemanagement solution]

As a follow-up on my previous post, I’ve decided to make a short video demonstrating how to create a better solution. I still use the same method, but I’ve added some functions that makes it semi-dynamic. I say semi-dynamic because you’re still hardcoding the number of subfolders you want. It’s only the names of the folders that’s dynamically. While

making the video I thought about how to make this fully dynamic with a dynamic number of folders as well as dynamic folder-titles. To the best of my knowledge it would require a way for the SharePoint Designer Workflow to loop through all items in a list and for each item, create a subfolder. SharePoint Designer Workflows, just aren’t that smart. so we have to settle for semi-dynamic. You could go nuts and create a workflow that listens to 30-50 items in a list. Then you should be on the safe side of crazy users trying to implement some wicked nightmare of a folder-structure.

[embedplusvideo height=”393″ width=”650″ standard=”http://www.youtube.com/v/7-7kqdCA1ys?fs=1″ vars=”ytid=7-7kqdCA1ys&width=650&height=393&start=&stop=&rs=w&hd=0&autoplay=0&react=1&chapters=&notes=” id=”ep2656″ /]

Whats up next?

The first question a asked myself, after finishing the screen cast was, “What if I want to add another level of folders, so I have 3 levels, and still keeping the semi-dynamic functionality”?

Answer: I will get back to you… that’s little harder, but should be possible.

Here is how you do it in 11 simple steps (Or watch the video)

  1. Create a custom list
    • Listname: Projects
    • Type: Custom list
    • Columns: Title (Default), Project documents (Hyperlink)
  2. Create a custom list
    • Listname: FolderList
    • Type: Custom List
    • Columns: Title (Default)
  3. Create a document library
    • Listname: Shared Documents
    • Type: Document Library
    • Columns: The usual suspects (Just create a standard one)
  4. Open SharePoint Designer and create a list-workflow, based on the “Projects” list.
  5. Create 4 workflow steps
    • Step 1: Create Variables
    • Step 2: Create Rootfolders
    • Step 3: Create Subfolders
    • Step 4: Create link to documents
  6. Create Variables
    • Command: Set Workflow Variable (VRootFolder to [Current Item: Title]]
    • Command: Set Workflow Variable (VSubfolder1 to [Folderlist:Title, where ID=1])
    • Command: Set Workflow Variable (VSubfolder2 to [Folderlist:Title, where ID=2])
    • Command: Set Workflow Variable (VSubfolder3 to [Folderlist:Title, where ID=3])
    • Command: Set Workflow Variable (VSubfolder4 to [Folderlist:Title, where ID=4])
    • Command: Set Workflow Variable (VSubfolder5 to [Folderlist:Title, where ID=5])
    • Command: Set Workflow Variable (VLinkToDocs to https://domain.sharepoint.com/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2FShared%20Documents%2F[%Variable:VRootFolder%], Project documents)
  7. Create Rootfolder
    • Command: Create ListItem
      • List: Shared Documents
      • Add: Content Type ID (Value: Folder)
      • Modify: Path and Name (Value: [%Variable:VRootFolder%])
  8. Create Subfolders
    • Command: Create ListItem
      • List: Shared Documents
      • Add: Content Type ID (Value: Folder)
      • Modify: Path and Name (Value: [%Variable:VRootFolder%]/[%Variable:VSubFolder1%])
    • Command: Create ListItem
      • List: Shared Documents
      • Add: Content Type ID (Value: Folder)
      • Modify: Path and Name (Value: [%Variable:VRootFolder%]/[%Variable:VSubFolder2%])
    • Command: Create ListItem
      • List: Shared Documents
      • Add: Content Type ID (Value: Folder)
      • Modify: Path and Name (Value: [%Variable:VRootFolder%]/[%Variable:VSubFolder2%])
    • Command: Create ListItem
      • List: Shared Documents
      • Add: Content Type ID (Value: Folder)
      • Modify: Path and Name (Value: [%Variable:VRootFolder%]/[%Variable:VSubFolder2%])
    • Command: Create ListItem
      • List: Shared Documents
      • Add: Content Type ID (Value: Folder)
      • Modify: Path and Name (Value: [%Variable:VRootFolder%]/[%Variable:VSubFolder2%])
  9. Create link to projectfolder
    • Update ListItem
      • List: Current
      • Item: Current
      • Add: Project documents (Value: [%Variable: VLinkToDocs%])
  10. In setting for the workflow, set it to run when a new item is created
  11. Publish the workflow, and test it out.

 


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.