Extract the parent foldername of a document in a SharePoint Designer 2013 workflow

Using the LastIndexOf Algorithm for SharePoint 2013 workflows described in my previous post, you can now extract the parent folder of a document in a SharePoint 2013 workflow using SharePoint Designer.

The following example retrieves the parent folder for any document. The variable FolderName is empty for documents that are created in the root of the site collection. Handy for custom (drop-off) libraries that require action or routing based on the folder in which the document is placed. (Of course, normally you’d use metadata columns for this, but in some cases, columns are not really an option, i.e. when dealing with documents coming from SharePoint-unaware scanners).

Click for the full version

 

4 thoughts on “Extract the parent foldername of a document in a SharePoint Designer 2013 workflow

  1. For 2010 and 2013, look at a codeplex project titled iLove SharePoint, it will add a SPD Action that retrieves the document parent folder.

  2. Hi Morgan,

    Fantastic post. Works like a charm. I needed this to update some fields of a document set based on the fields of a document within the set.

    Thanks

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>