Donnerstag, 3. Mai 2012

Check if a Sharepoint list folder already exists

How-To: Check if a folder already exists using a SPD workflow

Sometimes you might want to check if a folder already exists in a certain list before doing some actions.

This check is not very obvious, but still pretty easy.

  1. Create a string workflow variable.
  2. Now create a lookup for your folder and set the variable to the folder's title. Take a look here for some helpful information and usage guidelines when it comes to list folders.
  3. The actions dependent of the existence of the folder have to be placed inside an if-statement
  4. E.g. the if-statement should be like "if [variable] not equals [folder name]" if you want the actions only to be run when the folder does not exist

For example, you could only create folders if they do not exist already.