0

I'm trying to figure out if this is possible. In a document library I want to send alerts when a document is added to the library and another email when any documents are modified. So these are two differently worded emails.

I thought if I put document created=modified as my value that if they were the same it would be a new document. If they were not the same time then it would be modified. Well, that doesn't work. Now, I'm trying to figure out how write a workflow to deter the difference? I know I can have 2 workflows, one workflow when a document is added and another when it is modified, but I was hoping to accomplish this is one workflow.

Does anyone know how to do this?

1 Answer 1

0

You could add a Yes/No column to the document library called CreatedEmailSent (and update the list content type to hide it so users don't see it in forms). When the document is added, CreatedEmailSent will have no value. Your workflow could check the value of this field every time it runs. The first time, when the field has no value (or is set to a default value of No), you could send the created email and update the value of CreatedEmailSent to Yes. Any time the workflow runs in the future, the field's value would be Yes and your workflow would know to send the modified email instead.

1
  • Maybe I spoke too soon. I noticed that my version number increases from 1.0 when the document is first placed in the library and then when the workflow finishes it is at version 4.0.
    – jviola
    Feb 9, 2015 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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