Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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

Former Community Member

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

Former Community Member

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

Avatar

Former Community Member

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

Former Community Member

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