Adding line breaks

Hello,

I am having an issue with a workflow I’m developing.

The workflow is for sending emails to people with a payment default. In order to format the email body, I am attempting to add line breaks. I tried using environment.NewLine, set in an assign activity (will work in message boxes, not in the email body section)

“[k(enter)]” (prints instead of pressing enter)

(arrow)br(arrow) where (arrow) is < or > (missing XML tag) No Screenshot for this

\n (Identifier Expected) No Screenshot for this

Does anyone have any suggestions of what to add, or any alternatives I could try instead? I cannot share the workflow due to sensitive information, hence the blanked out parts on my screenshots.

Many thanks!

1 Like

@william.coulson

If I got you correctly you are writing emails.
Maybe its in the html format so give a try on using <br/>

1 Like

Hello @william.coulson

Do not add line breaks. This can be done easily by using a HTML editor because email body is usually in HTML format.

So, use a free online HTML editor and type your full letter there. This will generate the HTML code. If you need to bind in values like the name of the person etc, those things can be later binded into the email body through string manipulation.

Once the HTML code is ready, add the code template into a text file and save it.

Now, in the workflow, read the text in the text file through read text file activity.

Now, t hrough string manipulation, add the values you need to be combined…

Now, use the final string in the email body. this will structure your email in a nice and a beautiful way :slight_smile:

1 Like

@ppr, I am having validation errors with using br/, either end of statement expected or expression expected

Expression_Expected_br

2 Likes

@william.coulson even <br /> is string so do not exclude

1 Like

@ppr @Lahiru.Fernando,

neither suggestions work, I’m afraid. I have tried setting it an assign, like I was doing previously, and that hadn’t worked. I have now tried moving the value to a textfile and reading it, as you suggested Lahiru, but it is taking everything and printing it (printing all < br/> and < p> set in textfile using a html editor). Anything else I can try?

Many thanks

1 Like

@william.coulson
can you post a screenshot of the properties pane from your email send activity

1 Like

@ppr I have been instructed to work through a website, so I’m using an attach browser and a type into activity. Should’ve specified that, apologies.

1 Like

then please help us with a screenshot on this. I guess you are using a form, textfield from a webemailer right?

1 Like

@ppr,

Find attached the screenshots of the email body, trying with my previous environment.newline attempt and the suggestion @Lahiru.Fernando made.
EmailBody_ActualBody

The first one was the closest, but the environment.newline just added more spaces and didn’t set a line break.

1 Like

@william.coulson
great I do feel that the brackets are translated into the html entity codes.can you crosscheck while inspecting the resulting html source code of the textfield?

1 Like

@william.coulson
I had a second look on the screenshots and saw also all other html tags in the text. A strong pointer that not html can be used.

Can you do following for testing:

  • use a type into activity on an empty text field and let type in “Hello [k(enter)] World”.
    Does this do a linebreak?
1 Like

@ppr,

See attached

Type_Into_Activity_Kenter

1 Like

@william.coulson
have a look on this text area W3Schools Tryit Editor
and could you setup a rnd xaml from your end and check the result

on my end it did the line break

So now we have to found out whats the difference or what alternate we can use e.g. click and send hot key inside the text area.

Update:
Hot key trick was working on the box from link above

1 Like

@william.coulson can you check if you have simulate type enabled. If its enabled can yo do a run with disabled option and let type in with type into “Hello [k(enter)] World”

2 Likes

Hi @william.coulson

i tried the below and it worked. See if that’s helpful for you.

Thanks

01


OUTPUT

02

3 Likes

@ppr @atinder,

It is working now! I activated SendWindowsMessage and disabled SimulateClick, seems to be working fine now! Thank you so much!

Properties_Panel_EmailBody TypeInto_EmailBody

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