locked
Triggering a Workflow once the Document status of all docs in a library is set to a single value. RRS feed

  • Question

  • Hello! I've got a document library with a column called "Document Status" which is a choice with options "draft" and "Final." I want to trigger a workflow that will send an email alert once all the documents in the library are set to "Final." I followed the directions from a post here (below), but when the documents are all set to final it sends multiple emails. The only tool I have is SharePoint designer. Does anyone know why this isn't working, or how to limit the number of emails to one?

    Thanks!

    Here's the directions I followed:

    Open the site in SharePoint Designer .Click  File>new>workflow .

    2.       Specify the list as document library ,then click next .

    3.       Choose the Conditions as  ‘Compare any Data Source’ .Click on the first value .Set the ‘source’ in look up details as document library and the field as document status. Set the field in the ‘Find the list Item Field’ as document library and the value as ‘draft’ .Then click OK.

    4.       Change ‘equals’ to ‘not equals’ by clicking on it .

    5.       Set the second value as ‘draft’ .

    6.       Choose ‘Send an email’ in the Action field .

    7.       Click OK to save the workflow .


    • Edited by Mike Walsh FIN Tuesday, June 7, 2011 3:17 PM Stop shouting in Titles
    Tuesday, June 7, 2011 3:12 PM

Answers

  • Your workflow looks at each item individually, which is why you're getting multiple emails. It's not looking at all the items in the library.

    Unfortunately, there isn't a simple OOTB action in SPD that will force the workflow to check metadata values of all items in the list.

    This is really, in my opinion, beyond the scope of what SPD can do, and you're probably better off trying to design something like this in Visual Studio than creating your own little Rune Goldberg workflow in SPD.

     

     


    Planet Technologies || SharePoint Task Force
    Wednesday, June 8, 2011 4:42 AM
  • Hi ,

     

    I understand the  workflow as I have tried this kind of workflow before .I need you to provide some information.

    ·         How do you change the document status all to final? Manually change them one by one or just change them use a custom workflow at a time?

    1.       If you change one by one ,then after all the document status have been changed to final ,the workflow will send only one email . At this time ,if you choose edit an item ,even though you don’t perform any changing , the workflow will send an email .It is because you have chosen to start the workflow when items change .

    2.       But if you change them using a custom workflow ,then the workflow will edit every item .So sometimes even all the document status have been change to final ,it will carry on to change the others .It means that ,the workflow will start multiple times when items change .It will send multiple emails .

    ·         How do you set the ‘Send an email ’action .How many users are in the ‘To’ field?

     

    If you have any more questions ,please feel free to ask .


    Regards, Rock Wang Microsoft Online Community Support
    Wednesday, June 8, 2011 10:42 AM

All replies

  • Your workflow looks at each item individually, which is why you're getting multiple emails. It's not looking at all the items in the library.

    Unfortunately, there isn't a simple OOTB action in SPD that will force the workflow to check metadata values of all items in the list.

    This is really, in my opinion, beyond the scope of what SPD can do, and you're probably better off trying to design something like this in Visual Studio than creating your own little Rune Goldberg workflow in SPD.

     

     


    Planet Technologies || SharePoint Task Force
    Wednesday, June 8, 2011 4:42 AM
  • Hi ,

     

    I understand the  workflow as I have tried this kind of workflow before .I need you to provide some information.

    ·         How do you change the document status all to final? Manually change them one by one or just change them use a custom workflow at a time?

    1.       If you change one by one ,then after all the document status have been changed to final ,the workflow will send only one email . At this time ,if you choose edit an item ,even though you don’t perform any changing , the workflow will send an email .It is because you have chosen to start the workflow when items change .

    2.       But if you change them using a custom workflow ,then the workflow will edit every item .So sometimes even all the document status have been change to final ,it will carry on to change the others .It means that ,the workflow will start multiple times when items change .It will send multiple emails .

    ·         How do you set the ‘Send an email ’action .How many users are in the ‘To’ field?

     

    If you have any more questions ,please feel free to ask .


    Regards, Rock Wang Microsoft Online Community Support
    Wednesday, June 8, 2011 10:42 AM