Get Text activity - To make multiline text as one

Hi everyone,
I have multiline text on the GetText activity that i want to make one.


I used the logic :-
(Message.Replace(Environment.Newline," ")).Trim
but seems it is not working.

Please help me , i want to combine these all line in one line.
Thank you in advance.

Hi @Anjali_Rani,

Can you paste the txt in a note document and share it?

You probably have tried it but you can also check the following.

Message.Replace(β€œ\n”," β€œ)
Message.Replace(Chr(10),” ")

Regards,
MY

Hi,

The following might help you.

Regards,

String.Join(" ",Str_Value.Split(Environment.Newline.ToCharArray,StringSplitOptions.RemoveEmptyEntries)

2 Likes

This solved my problem. I don’t know if it solved the original solution seeker but this was a perfect solution for the problem I had with text being stretched out over 2 lines so thanks. :slight_smile:

1 Like