I have to implement a logic to check if a document exists in a document library using a key field. If document exists, update a custom meta data column. But when document doesn't exist, workflow throws error. How to bypass this error if document doesn't exist?
Thanks!
Page 1 / 1
Hi,
Here's what I will do:
- Create a data field (eg. DocExists), and set the default value to -1. This data field will be used to check if the document exists
- Create an activity, which contain just a SmartObject Event.
- Configure the SmartObject Event to call the Get Document Metadata method, and for return mapping, map the ID to the data field created in 1.
- Right-click on that activity , go to Properties, select the last tab, and check on 'Enable exception rule'. So this basically catches the error, but if you do not check on the remaining two options, this error will not get logged.
- Create two path, and add the following line rules to the two line:
- Line 1: If data field >= 0. This is the path where the document exists
- Line 2: If data field < 0. This is the path where the document does not exists
Thank you very much! This is exactly what I wanted to do.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.