locked
OOB Approval workflow to start a custom workflow when approved RRS feed

  • Question

  • Hi,

    I currently have a document library with the out of the box approval workflow enabled. I need to start another workflow on the documents when they are approved. The second (custom) workflow will create a KPI list item linked to the document and assign an ID.

    I currently have both workflows working well, except I have to start the second workflow manually when the approval is complete.

    I tried the obvious and told the second workflow start when the item is changed, but as you may know, when approved the document library item isn’t actually modified. So the workflow doesn’t start.

    I then decided to create my custom workflow in the 'Tasks' list instead of my document library. This time the workflow does start when the approval status changes. So far so good.

    I then had to think of a way to update the original document from my workflow in the Tasks list. Unfortunately there doesn’t seem to be a link between the task and the original document. The task list doesn’t store an ID for the document. The only way to do it is to use the hyperlink. Which works quite well..

    The OOB approval workflow creates an item with a hyperlink to the original document in a column named 'link'. In my custom workflow I can search the absolute encoded URL's column in the original document library for a match.

    The only problem I have is the hyperlink from the tasks list includes spaces, the document library hyperlink uses '%20'. If my document has no spaces in the name the whole thing works seamlessly. If I have spaces it doesn’t work!

    Is there a way to create a calculated column or some other way to either replace spaces with %20, or replace %20 with spaces?

    Thanks!  

      

    Tuesday, December 20, 2011 3:24 PM

All replies