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
Jobin_Joy
(Jobin Joy)
December 8, 2021, 8:26am
2
@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,
UiPath.Core.Activities.IsMatch Indicates whether the specified regular expression finds a match in the specified input string, using the specified matching options. This activity has a RegEx Builder wizard that can be used to configure it, on which...
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?
Jobin_Joy
(Jobin Joy)
December 8, 2021, 8:37am
5
@Seema_Jethe
Try-Catch is common for a flow irrespective of the activity your are using.
Here is a sample flow
Thank you.
system
(system)
Closed
December 15, 2021, 9:19am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.