Capitalize first letter of a string for Composed words

Unfortunately not working too, Could you please share small example with ForEach and Assign Activities to show the same. Thanks

1 Like

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.

1 Like

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

1 Like

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 OutputOutput.xlsx (8.4 KB)

1 Like

Hey @hsendel

Please find the updated,

CapitalizeFirstLetter_v2.zip (8.5 KB)

Thanks
#nK

1 Like

@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.

2 Likes

Thanks both @Nithinkrishna & @supermanPunch , You’re ending with same result, I got the error, I was updating the assign value instead of ArrayValue :+1:

1 Like


Regex.Replace(“HELLo FOLLOw-UP”,“\b(.)(.*?)(\ |$)”, Function (m) m.Groups(1).Value.ToUpper & m.Groups(2).Value.ToLower & m.Groups(3).Value )

2 Likes

Cool @hsendel :slight_smile: :+1:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.