Add newline while concatenating strings

Description
nikhila
Posts: 4
Joined: Thu Jan 28, 2016 5:52 pm

Add newline while concatenating strings

Postby nikhila » Wed Jun 08, 2016 11:05 pm

Hi,

I am working on a custom script using classic WIKI pages where I need to iterate through serval custom text fields and prepare a concatenated text. I also need each field value to be in a new line.

After searching through several posts I came to this code:

Code: Select all

VelocityContext ctx = new VelocityContext();
ctx.put("newline", "\n");
#set($strResult="$strResult $newline ASIC:$text")

Unfortunately this didn't work either.

Any ideas?
~Nik

nikhila
Posts: 4
Joined: Thu Jan 28, 2016 5:52 pm

Re: Add newline while concatenating strings

Postby nikhila » Mon Jun 13, 2016 8:45 pm

Update:
I tried using the escape tool as well and no luck.

Code: Select all

$escapeTool.newline
$escapeTool.n

Interestingly I can use the escape tool to add a $ sign:

Code: Select all

$escapeTool.d

Any pointers would be appreciated.

Thanks
~Nik

Harou33
Posts: 10
Joined: Wed Apr 04, 2018 10:40 am

Re: Add newline while concatenating strings

Postby Harou33 » Thu Jun 14, 2018 11:32 am

<br/>


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 2 guests