Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding a newline character in concat method

Avatar

Level 1

I am trying to create a txt file in UNIX environment and building a string using concat method.  The requirement is to insert a new line between the string value.  I tried the following but nothing seems to work.

  1. concat("FirstLine","\n","SecondLine);
  2. concat("FirstLine","\\n","SecondLine);
  3. concat("FirstLine","/\n","SecondLine);
  4. concat("FirstLine","&#xA","SecondLine);
  5. concat("FirstLine","&#x0A","SecondLine);
  6. concat("FirstLine","&#xD","SecondLine);
  7. concat("FirstLine","&#x0D","SecondLine);
  8. concat("FirstLine",CHAR(10),"SecondLine);
  9. concat("FirstLine",Char(10),"SecondLine);

attempts 1-7 concatenated the string into only one line.  Attempts 8,9 threw an error saying "CHAR" or "Char" is not a valid method.  Can anyone help me out with this?

Thanks a lot

4 Replies

Avatar

Level 6

Is it possible where you are passing this value, you could pick template as the type of input and put your new lines in there?

One solution would be to use a script step.

Avatar

Level 6

The discussion list showed this post as from 2 days ago even though it is over 3 months old.

Avatar

Level 3

Hi Steven,

regarding the "add new line!" see forum:

http://forums.adobe.com/thread/960612?tstart=0

I tried many different options, and the most consistent was to go the executeScript way.

Make a resuable component or something like that.

hope it helps...

Avatar

Level 6

I was answering the question, not looking for additional info. Steve is short for Stephen.