Carriage Return/Line Feed
I want some of my strings to have carriage return/line feeds in them, primarily for message boxes, alerts, hyperlink downloads, etc. But I can't get VB syntax to work. It seems that the constants vbCrLf and vbNewLine are undefined, as Workflow Designer puts red exclamation marks near string constants that include those placeholders. Chr(13) + Chr(10) don't work either, and it also doesn't seem to matter if I try to concatenate with ampersands or plus signs.
Any ideas?
"Roj"
-
Hi Roger,
To get vb syntax to work you have to go to the Imports tab (along the bottom beside Variables and Arguments), and import Microsoft.VisualBasic. Then you should be able to use vbCrLf etc.
-Victoria
0 -
Thank you. To those who read this post later, I had to open the Imports tab at the bottom of Workflow Designer, then click the drop-down box at the top of the list, then select Microsoft.VisualBasic, and then it got added to the list below. Now vbCrLf is an acceptable constant in string expressions in Workflow. Thanks!
0 -
Thanks for taking the time to explain your solution!
0 -
Use Enviroment.NewLine (this is C# but pretty sure it's in VB too)
0 -
Hi,
I've tried Microsoft.VisualBasic and other method but nothing worked.
I wanted to personalize the message box with a newline . If anyone can helpme, can be fine!
Thank you
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000kA11&feoid=Body&refid=0EMf2000000fyEA"_/_img_
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000kA11&feoid=Body&refid=0EMf2000000fyEF" _/_img_0 -
Use "Environment.NewLine": "This is line 1" + Environment.NewLine + Environment.NewLine + "This is line 2"- or -string.Format("first line{0}second line", Environment.NewLine)0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare