Workflow not firing for new documents uploaded to a document library

David Lozzi
  • Workflow not firing for new documents uploaded to a document library David Lozzi

    I have a doc lib that has several meta fields in it. I have a workflow that processes the doc based on these fields. Everything runs fine when the doc already exists in the library.

    If we add a new one by uploading (I havent tried New) the workflow doesn't fire properly. Looking at the debugger, when I click Upload, browse to select the file then click OK, the workflow fires. At this point, my meta data is empty as it's a new upload.

    Then SP sends me to the edit properties page for the doc (editform.aspx). I now fill out my meta data and click ok. The workflow doesn't fire again. If I go back into edit properties and click OK, it fires.

    We need this to fire on the first edit page. As a work around I'm instructing my customer to upload it, then close it then edit it again. Not cool.

    Any ideas?

  • When you add a document to a Document Library, there are two steps, as you know: Upload and Edit. The Upload step is like the New step in other lists; that's when the document item is actually created. It sounds like you want your workflow to run on the item change instead. If you only want the workflow to do its thing on the first edit of the item, then make sure to set a value that indicates it has already run or compare the Created and Modified dates, etc.

    M.

Tags
workflow
Related questions and answers
  • I have an InfoPath form embedded in a MOSS 2007 page. The form is for requesting approval for a project. The submit button submits the form data to a form library. That triggers a workflow to get approval for the request. So far, my workflow uses the "Collect Data From User" action and the "Send and email" action. I configured data collection option so that there are two inputs: two radio... is small and does not take you directly to the page where you can click "Complete Task" (you have to click Edit Item from the linked page) The data and approval form are separated Simplicity is key

  • I have a document library with a document template (docx) in which several Quick Parts are defined. The Quick Parts link to column data in the document library. How do I create the document by filling in the column data on a NewForm, thus without opening the document template itself? Thus: Click new -> go to a page with the NewForm -> fill in the fields -> click OK -> Voila a new Document in the library with the provided metadata.

  • Scenario: We have an internal application that ties Excel spreadsheets stored in a SharePoint doc lib with specific Opportunities in CRM. The user clicks on a button in the Opportunity and a Web page is opened that: Looks to see if a folder in the doc lib exists with the Opportunity's GUID. If not, then it creates that folder and copies an Excel file that is used as the template.... Note that this is just opening the Excel file without checking it out. Problem: Once in a while, and for no reason I can figure out, a user will click the button and the spreadsheet will be returned

  • for each customer, we could use basic permissions in a single document library, and she could override the permissions per doc. The issue here is when a customer uploads a file, the permissions won't be overridden automatically (unless I can do it through SPD?). And my final option is to create a doc library for each customer. The issue here is when a customer logs in, how can I display a web part for only the doc lib they have access to, and not the other customer's webparts? If I put them all on the home page, the user will get a message stating they don't have permissions to view the data

  • I have a document library using a document set content type. I can create a new document set through the UI and it works perfectly. I'm now trying to create a document set in this library programmatically and it's not working properly. Here is the code (based on MSDN documentation): // Set some properties Hashtable properties = new Hashtable(); properties.Add("UploadComplete", false... for the set looks like a folder instead of the document set icon clicking on the document set doesn't show the document set home page, it just behaves like a normal document library running CAML queries shows

  • to write the destination file, iterate through all fields of the source file and then update the destination file again. If I treat all documents the same then either meta data is not copied over...) == false) { // ** Pre office 2007 formats (without the trailing x) are treated differently // ** from the office 2007 formats when it comes to copying meta data. Hashtable metadata...) { spDestinationFile.Item[field.Id] = sourceFile.Item[field.Id]; } } // ** Update the meta data spDestinationFile.Item.Update(); } Note that this may be related to my

  • So I recently had a nice hitch in the SharePoint app I made for my client. We have a Document Library which is supposed to contain PDFs, converted from drawing files made in other programs. The test... situation. Because this is a real field test, I cannot simply upload the new PDF file and run it through the process, I need to maintain the field data from the original file, in all of its versions as well. Is there a way I can somehow upload the PDF as a new version of the original file?

  • I am using SharePoint 2007 Server x64 on Windows Server 2008 x64. I create a new SharePoint web application with a new site collection at the root of the web application. I select the template "publishing portal" for the site collection. I have also enabled anonymous access. Now the basic function is fine, except that I do not know how to change the first front page (i.e. the page showed to end users who have not logged in yet) of the site. Here is a screen snapshot. Any ideas how to edit this page? Publishing home page http://i33.tinypic.com/2hex08j.png BTW: I have tried to edit

  • on the right side of the page. Also, I added again my SurveyViewer web part to display Quiz. 2- The user opened the page and s/he only wants to Vote, So s/he selects and clicks Vote. 3- Nothing gets...My problem precisely and concisely is that I developed a simple web part to display OOTB Surveys on the page (Which means user can answer and submit the survey through my web part). It works correctly. BUT when I add the web part two times, then, User will not be able to submit any of them. Simply because when s/he answer the first survey and click Submit-Button, the required field validation

Data information