Stop workflows from running on documents in document set

  • 12 January 2018
  • 6 replies
  • 7 views

Badge +1

My problem is that I have a workflow that is meant to run on documents sets. Where I am having a problem is, this workflow converts a .docx document in to a .pdf and then immediately moves the created pdf to a separate library. Another workflow I have is set to run on newly created items and therefore tries to run on the converted pdf which is then moved. This causes the error in the image below. My question is, is there a way to stop workflows running on documents inside a document set or is there a way to pause my currently until the workflow completes on the document inside the document set?(I have a 'Run If' action at the start of the workflow which is ran on new items that only allows items with a document set content type into the main part of the workflow so when ran on documents it completes fairly quickly but the below error is still occurring.)


6 replies

Userlevel 5
Badge +14

You could target the ContentType in the start conditions. 

ContentType === "Document Set" would mean that a newly created Item that was of the Document Set content type would run that particular workflow, but the documents created inside of would be ignored as their Content Type would be "Document" or whatever you set them to as a custom option. 

Adding the Content Type column to your View is an easy way to see which Content Types you're currently using. 

I hope that this helps. 


Userlevel 5
Badge +14

You had asked a question describing my above process, but have since deleted the question. Below is what I had typed up. 

In your Workflow Settings, find the option for starting the workflow when an item is created, and instead of just setting it to yes, set it to Conditional: 

212157_pastedImage_1.png


Clicking on the "Conditions" button:

212158_pastedImage_2.png

Will take you to the Conditional Startup Options Dialog: 

212165_pastedImage_3.png

From here, all you'll need to do is set up the Content Type option as I was talking about:

212166_pastedImage_4.png

This will mean that any new item that is created in the document set that also has the content type of "Document Set" will execute the workflow, while everything else will not. 

Badge +1

Conditional is not an option available to me in the workflow settings:

Is there something I have to do to make this option appear?

Userlevel 5
Badge +14

Which version of SharePoint / Nintex are you running? 


Userlevel 5
Badge +14

NEVER MIND! 

You can't set a conditional start option on a Library, because of reasons... I guess. 

I would solve this problem by wrapping everything you want to do in a big Run If condition that will check the Content Type using the logic applied above. 

Sorry for being misleading, it's just that I don't often make workflows for Libraries. 

Whoops! 

Badge +1

Pretty annoying limitation in the functionality. At our org we use document sets for a ton of workflow related efficiency. This means I have to design extra work arounds for something that should just work.

Reply