views:

33

answers:

1

Hi,

I have an initial workflow in Sharepoint Designer that triggers whenever an item is created and also whenever an item has changed in the 'Employee' list .

Within second workflow I am updating the 'Employee' list and the workflow above is triggered.

Is there any way I can check in the intial workflow if the item has been updated by a user or if it was updated by a workflow. In the case if the item was updated by a workflow I would not want to trgigger it.

Many Thanks,

+1  A: 

Through SharePoint Designer, you cannot cause an update to an item to not trigger workflows that are listening for it. But, you can cause the workflow to basically be skipped with one extra Step.

Try checking out this article at Microsoft Office, which discusses secondary workflow interactions in SharePoint Designer. In the first step, it identifies whether an item was created by a specific workflow, and cancels the workflow if it isn't. We just need to adapt this - if we successfully identify the item as being modified by your secondary workflow, then we want to cut off the first workflow.

You need to create a new Step in your initial workflow, and move it to the top. In it, choose the Compare Tasks Condition. In that condition, set field to be "Workflow Name", leave the operation as "equals", and set value to be the name of your secondary workflow. Then, add a Stop Workflow Action, specifying some appropriate workflow history message to indicate that the workflow was triggered by the secondary workflow so it was terminated.

ccomet