Experssion Editor add variable in multiple line


Add another plus to the varaiable like below


Also try to add in one line for the next line you can add +Environment.Newline+ for the next line

Hope this may help you


1 Like

if what i understand, that you want the newline to be there in the body of your email

For that, you need to use Environment.Newline in order to add a line break

Eg.: “Hello” + Environment.Newline + Environment.Newline + “I finish the work” + strVariable

1 Like


Hope the below steps would help you with this scenario and other scenario having multiple variables in different positions

—keep this text in a notepad but like this without any double quotes


I finish the work {0}**

Replace with a placeholder instead of a variable

  1. Now use a READ TEXT FILE activity and get the output with a variable of type string named Strinput

  2. Then use a Assign activity like this

String.Format(“{0}”, ”your value”)

That’s it

For multiple words or values to be placed
As an example
First store this string template in a text file

Name: {0}

Email: {1}

Phone Number: {3}

where 0, 1, 2 are the place holders where we are going to mention the string that is to be placed in 0, 1, 2
–and use read text file activity and pass the file path of the text file and get the output with a variable of type string named out_text

–then in the body mention as String.Format(out_text,“Mani”,“mani@gmail.com”,“1234123515”)
and the actual syntax is
String.Format(“{0} {1} {2} …”, “value1”,“value2”,“value3”)
where {0}{1} are already in our output variable obtained from read text file activity and value1, value2 and value3 are passed as string between quotes if they are values or if we have those values in variables then we can mention the variable name alone without double quotes around them like this
String.Format(“{0} {1} {2} …”, variablename1,variablename2,variablename3)

Cheers @Soudios

1 Like

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