0

I have a custom workflow I made in SPD that sends an email to different people depending on the value of a column, in this case it's when it's their turn to edit a document. The person will get an email from the workflow notifying them of the task, and then they edit the document. Then when they save the document, they will get the same email again since the document has changed, but the document property hasn't. Then they will have to go to the document and edit the property to assign the task to the next person.

The workflow is:

If current item field equals value
     Email these users

I want to eliminate the repeat email. Is there a way to do this?

I ideally I would want a way to make the properties box appear every time the document was saved, but if that is not possible then I want the workflow to only email when the value of the column changes.

I should note, I am currently using SP 2010, but we will be upgrading to 2013 soon.

Thank you

Update: I got the workflow to work using the second option listed in the Answer below as well as adding one other part. The document needed to be checked out and then checked back in before the workflow can make changes.

0

The only way I believe you can do this is if you create a second column for each column you're evaluating. If your main column is status, then create a new column named something like prevStatus.

If your workflow only sends a single email, for clean "code" you can then place an IF condition that says if status equals prevStatus; end workflow before your previous IF condition:

If status equals prevStatus:
    end workflow
If current item field equals value, and the Action
    Email these users
    change prevStatus to Status

If you do other things in your workflow maybe structure it this way:

If status not equals prevStatus:
    If current item field equals value, and the Action
        Email these users
        change prevStatus to Status

Then you can have multiple columns to monitor:

If status1 not equals prevStatus1 OR
  status2 not equals prevStatus2 OR
  statusN not equals prevStatusN:
    If current item field equals value, and the Action
        Email these users
        change prevStatus to Status
  • Hello, I tried the first and second options you replied with. I couldn't get them to work unless I removed the setting "Require documents to be checked out before they can be edited". I didn't have an issue with this setting being turned on when it was my original condition and action I wrote above. I need it to be on. Do you know what might be wrong? Also I wasn't sure how to add the "and the Action" so I left that out – Kayla Jun 20 at 18:27
  • Ah yes, you’ll need to check the item out before you make the change(s) then check it in after the change. You can then send the email after that. The check in/out is a function in SP 2010 workflow. – KGlasier Jun 20 at 18:30
  • If I check it out, the workflow says "In Progress". Once I check it back in the work flow changes to "Cancelled" with this outcome "The workflow operation failed because the action requires the document to be checked out." – Kayla Jun 20 at 18:34
  • Are you checking it in/out or are you using the actions within the workflow? – KGlasier Jun 20 at 18:36
  • When I change the properties, I have to checkout the doc before I can make changes. Once I'm done, I manually check it back in. In the original workflow that I had posted (it has the require to be checked out on) the workflow says "In Progress" when I check it out. Once I check it back in the work flow changes to "Completed" – Kayla Jun 20 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.