I’m using UiPath StudioX version 2021.10.4, and using the “Matches” activity to search a text file generated from Read PDF with OCR. I should only need to access the first index of result, but am having trouble doing that. The result won’t show up in the “save for later” activity. It does work with the “for each” activity, but I’m unsure how to save the first result to a variable for later use. I have been able to store the results in a text file, but unsure of how to get info from that text file without using the “Matches” activity (starting this whole process over).
For example, the result from Matches would be named ‘MatchingDatesResult’
EDIT: Thanks everyone for trying to assist with this. It looks like the activity I’m using got updated and has the exact functionality that I was missing that caused the original issue. This issue is fixed now.
You can try Find Matching Patterns Activity instead. The result will be a string variable for the first match. If the text is not found the result will be an empty string
The output variable stores all the matches and use the for each activity and pass the output variable into the for each activity so that you can loop through each data extracted.
When trying what you sent previously, I get this same error for both options,
“‘MatchingDatesResult’ is not declared. It may be inaccessible due to its protection level.” Can provide more info on my settings.
Would that info go into the result section for the Matches activity? I’ve only been able to declare variables using the Save For Later activity, and I wasn’t able to use the provided info there. I can describe it more or post images to clear up any confusion.