in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Scott's blog

July 2007 - Posts

  • “Failed to load the workflow” Error Message in SharePoint Designer

    I recently ran into this problem when trying to either create a new workflow or open an existing workflow.  With help from The Dean I was finally able to find a solution that worked. I navigated to C:\Documents and Settings\<my user name>\Application Data\Microsoft\SharePoint Designer\ProxyAssemblyCache and deleted the existing folder (12.x.x.xxxx).  I then opened SharePoint Designer, created a new workflow, and it opened just fine.  I posted this solution on the forums with the question, but it doesn’t hurt to get the information out to as many places as possible.  J
  • Change a Filename using a Workflow

    One of the questions that has arisen in our use of SharePoint is this: “How can we automatically change the filename of a document added to a document library?”  We have PDF files that are automatically created in SQL Server Reporting Services, and we want to take advantage of the ability of SSRS to create the files and email them and SP 07 lists to receive emails and add attached documents to the list.  Unfortunately we have not been able to figure out in SSRS how to append a date to the filename, so we turned to SP Workflows to find a solution.

     

    Through knowledge gained in training along with a lot of head scratching, we came up with a solution.  It may not be the best solution, but it works for us.

     

    1.       Create a column in the target library, name it “Text Date” (or whatever you prefer), set it as single line of text, and calculate the value using the following expression:

    =Text([Today], “yyyymmdd”) 

    2.       Create a workflow.

    3.       Give it a name and select the checkbox for “Automatically start this workflow when a new item is created.”

    4.       Click Next.

    5.       Add the Action to “Set Field in Current Item.”

    6.       Click Field and select “Title.”

    7.       Click Value, click the function button, and in the Field drop-down select “Name (for use in forms)”.  This will set the title as the current filename without the file extension.

    8.       Add the Action to “Build Dynamic String.”

    9.       Click “Dynamic String” and create it as follows using “Add Lookup” (Documents is the name of my target library):

         [%Documents:Title%]_[%Documents:Text Date%].[%Documents:Type%]

    10.   Click “Variable: variable1”, “Create a new variable…” and give it a name.  I called mine “FileName”.

    11.   Add the Action to “Set Field in Current Item” again.

    12.   Click Field and select “Name (for use in forms).”

    13.   Click Value, click the Function button, change the source to “Workflow Data”, and change the field to “Variable: FileName”.

    14.   Click Finish.

     

    Once the Title field has been used to build the FileName variable, it can be rebuilt using any method you see fit.  The “Text Date” field can also be calculated using any date format you wish, however special characters such as / and : cannot be used in a file name.

  • Some Information

    A little information about me:  I work for a software company in the support department.  We are implementing SharePoint as our department intranet, and this blog will be a way for me to post solutions to problems that I have been unable to find online.  The solutions may not be the best, but at least they’ll hopefully work.  What was the phrase I recently heard in our SharePoint Bootcamp?  Ah yes, “if it works, it’s ‘elegant’.” – Dustin Miller


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts