SharePoint Designer – Check if item exists

SP2013

Hello everyone,

Today I’ll talk, again, about the SharePoint 2010 Workflows of SharePoint Designer. I know it is deprecated but on some occasion, you need to use what you can!

So, one thing which is missing is the possibility to check if an item exists before doing some action.

For instance, I had an error when I tried to delete item which wasn’t existing. pretty annoying since at the end, what I wanted (not having this file) was done. But my workflow ended in “Error Occurred”.

So, as a workaround, what you can do is create a workflow variable => set its value to a value coming from the item you are looking for => check if the value is not empty to know if the item exists!

spditemexists1

Exactly!

When you try to perform an action on a non-existing item, you end up with a “Error Occurred” but if you want to read a value from a non-existing item, it doesn’t throw any error!

 

Hoping this helps!

Christopher

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s