Cool @hsendel
Wait …Error disappears but I got the following after execution :
For Each: Unable to cast object of type ‘System.Text.RegularExpressions.Match’ to type ‘System.String’.
Hey @hsendel
Keep the type argument of for-each as Match
data type.
In the statement inside For-each just do this.
Word.Value(0).ToString.ToUpper + new String(Word.Value.Skip(1).ToArray)
Hope this helps.
Thanks
#nK
There is no this option in the list : type argument of for-each as Match
data type.
Use Browse For Types and search Match.
Hey @hsendel
Go to browse for types → Search Match → Choose Match which is under mscorlib → Regular expression
If you are not sure on this, just send a screenshot of that window can point it out for you.
Thanks
#nK
In the Assign just again use Match.Value on the To field
Unfortunately not working too, Could you please share small example with ForEach and Assign Activities to show the same. Thanks
Hi @hsendel ,
Could you provide us with the Screenshots of the Workflow or Better yet the Workflow Itself.
There are some missing things, which we are not able to get a Hold on, Mainly, What is the Value that is being Passed to the For Each
.
We should be able to understand it better, once we have the visuals of the workflow.
Hey @hsendel
It should be like the below in the Assign
Word.Value = Word.Value(0).ToString.ToUpper + new String(Word.Value.Skip(1).ToArray)
Hope this helps.
Thanks
#nK
Dears,
Here’s the example.
CapitalizeFirstLetter.zip (36.2 KB)
Input ( Sentence) = The hyphen that makes the difference between follow-up and follow up is one such source of confusion.
Desired Output → Output.xlsx (8.4 KB)
@hsendel ,
You would simply Require to use a New String Variable in the Assign
Activity. Then add that variable in the Add Data Row
Activity.
Thanks both @Nithinkrishna & @supermanPunch , You’re ending with same result, I got the error, I was updating the assign value instead of ArrayValue
Regex.Replace(“HELLo FOLLOw-UP”,"\b(.)(.*?)(\ |$)", Function (m) m.Groups(1).Value.ToUpper & m.Groups(2).Value.ToLower & m.Groups(3).Value )
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.