How to stop a workflow from running every time a task is updated in SharePoint 2013?

Stacy Griffin 1 Reputation point
2022-12-01T02:57:18.643+00:00

Hi- I'm responsible for our internal SP sites that are used to manage product generation for clients...full disclosure, I am NOT an IT person or someone who is knowledgeable about coding at all... apologies if my descriptions aren't completely clear for experts. :) Our processes are typically pretty linear (follow task status steps from A-Z), but I currently have a project where we need to manage 2 different processes/sets of steps at the same time. We typically use task status steps to outline the process, so I thought I'd try tracking the progress of the second (smaller) process using checkboxes to avoid confusion on the user's end. The problem is that I need to trigger email notifications from them. After much googling, I figured out how to translate the checkboxes into a yes/no format/column that I can anchor a workflow around. However, I'm stuck on a few points... one: how do I stop the workflow from running every time the task is updated? In other words, how do I stop email notifications from this workflow going out every single time something in the task is altered? The team receiving them only needs to get a notification once, when the meeting in question is initially scheduled. The second issue is that by using the yes/no column I can't avoid that information showing up in the task form, even though no one needs to see/touch it (it appears to be the only field that can't be hidden easily from within SP & w/out the use of any coding). Any help would be GREATLY appreciated!!! I'm happy to provide more detail about what I'm trying to do, if it's helpful. TIA!

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,949 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
575 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,146 Reputation points
    2022-12-01T08:18:07.937+00:00

    Hi @Stacy Griffin ,

    According to my research and testing, if you want to stop a workflow in SharePoint 2013, please go to List Settings ->> Workflow Settings, and then you can edit the workflow or remove a workflow. For example:

    266034-image.png

    You also can use the following PowerShell to stop workflow in SharePoint 2013:

    # URL of the Site  
    $web = Get-SPWeb -Identity “https://mysite/sites”  
      
    #Get the Workflow Manager.  
    $workmanager = $web.Site.WorkFlowManager  
      
    # Name of the list  
    $list = $web.Lists[“xxxx”]  
      
    $items = $list.Items  
      
    foreach($item in $items){  
    foreach ($wf in $item.Workflows) {  
      
    #Cancel Workflows  
    [Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf);  
    }  
    }  
    $web.Dispose();  
    

    If you want to hide the yes/no column, please go to List Settings ->> Edit View, then you can choose which columns you want to hide.

    Hope it can help you. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.