I have three workflows set up that are linked to a SharePoint list created by an InfoPath form. The first workflow is kicked off when a user submits the InfoPath form - an email is sent notifying me that the form has been submitted. The 2nd workflow starts when I upload an attachment to the form - the original submitter is notified. The 3rd workflow kicks off when the original submitter uploads a final attachment to the form and I get notified. The first workflow works like a charm. However, because I have "start workflow automatically when an item is changed" turned on for the 2nd and 3rd workflows, both emails are sent when the third step is done. Is there a way stop the second workflow from starting when the third workflow starts?
You can create a logic in workflow number 2 that has a "if" condition. Create a column in the list your workflow belongs to. Then at the end of workflow 2 set a state to that field. Put your the current logic of workflow 2 in a if condition that only runs if your new field is empty. If the "else" part of your workflow 2 is empty it will simply just run through it and therefore not send a email.
Use the same logic in workflow 3 but the only difference is that workflow 2 sets a value to a field and workflow 3 only runs if it is a value in that field.
If my answer is unclear - feel free to contact me for more information.
I already have an if statement - Workflow 2: If Current Item: 2Item equals Yes, then email Current Item; Created By, then stop the workflow and log. Workflow 3: If Current Item: 3Item equals Yes, email me.