Try catch block in data extraction

I am trying to extract data from pdf but if no data is extracted assign activity throws an error can anyone please tell me how do i use try catch block to implement this so that it does not throw error if no data is extracted?
Below are the screenshots


image

@Seema_Jethe

Place your code inside try block and catch the exception.

First Check If RegEx match found based on that extract text.

Thank you.

Hi @Seema_Jethe,

First use Is Match activity,

to check whether the regex pattern is available or not. It will return boolean output.

If Yes,

Then use matches activity as per your flow. This will solve your problem without try catch.

Thanks!

@Jobin_Joy Could u please tell me should i place the assign activity or matches activity in try block?

@Seema_Jethe

Try-Catch is common for a flow irrespective of the activity your are using.

Here is a sample flow

Thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.