Im trying to capture hyper link of element by using Matches activity . If hyperlink is not present it should return NULL, but throwing an ERROR. Attached WF pls help. In this WF Hyperlink "View Detalis " is not present it should return NULL. splitstring.xaml (10.6 KB)
I’m trying to store the result in a variable, message box is just an output for me. In this case if the regex doesn’t match, NULL used be stored.I’m getting Error Pls Help
Try outputting the Count of the matches, so like
iEnumResult.Count.tostring
If that shows 0, then it’s nothing. The “IsNothing()” might not be working correctly. You can alternatively have the condition as: iEnumResults.Count = 0
You have highlighted a very valuable point when it comes to error handling workflows where Regex Matches don’t get a result because of either user error or the expected match does not exist in the input (probably an optional field).