Duplicate - Reminder: Writing one variable in single line in Write Line Activity

Hi @anjasing,

Surround your workflow with “Try Catch” Activity then get error message with string then replace error message.

plz check attached workflow

Main1.xaml (10.9 KB)

Thanks,
Rajkumar

Hey @anjasing

I can see you already got a solution as below…

Do you still face issue ?

Thanks
#nK

It’s not working! Still facing issue.

Hey @anjasing

Okay no worries.

Could you please explain about your ErrorMsg variable ? The type of it and from where you get the value ?

Also if possible please share the sequence…

Thanks
#nK

ErrorMsg variable i am storing it in string datatype.
I am extracting it from one xml file and writing it in one .txt doc…but it’s writing only one sentence in 3 lines… I need to put all 3 sentences into one line. Hope it clears!

Hey @anjasing

As I can see in your original thread screenshot it was writing the log in one line.

May be just check if word wrap is enabled in notepad which is causing the issue.

Thanks
#nK

Hi I’ve already checked it’s not word wrap issue. Even in log message it’s printing one sentence in 3 lines

1 Like

Hey @anjasing

Can you please try this,

ErrorMsg.Replace(Environment.NewLine, " ").Replace(vbLf, " "); 

Thanks
#nK