Hi all. I’m having trouble manipulating an object generated by “Matches” activity. My goal is to manipulate the string patter extracted by Regex before writing it in excel.
Since “Matches” activity outputs an IEnumerable variable then using a “For each” to get each item inside.
I need to manipulate this before I write the string into excel. Getting an error “options strict on disallows late binding”. Also getting an error when changing “Type argument” in the foreach properties to “string” instead of object.
The regex isn’t exactly the problem as I’m able to extract what I need from the document. What I’m having trouble is actually manipulating the results from the “Matches” activity as it comes out as an IEnum variable. The current work around for this problem is write the Matches result in a cell, grab the value in that cell and then manipulate it in a for each activity as seen below. Anyway to make this easier would be great and appreciated!
we would assume that the ClinAmount is the outcome from the matches activity. If so, the set the Typeargument of the for each to System.Text.RegularExpressions.Match
Feel free also to pass ClinAmount.ToList to the for each activity to overcome the restrictions of the IEnumerable we do have in some cases
Hey all, tried all the suggested solutions and still having the same error unfortunately. Here is the main thing I am confused about:
Matches activity grabs all the matches in the text according to the regex pattern, which makes the IEnumerable variable make sense.
Then when I try to reiterate through each result in the IEnumerable result, I’m able to write it to a cell as a string. However, I can’t manipulate that string. Please see screenshot below to add context to my question.
This is the workflow and error message. CLINS to string work. But manipulating this string doesn’t