Forum Discussion

mohit's avatar
mohit
New Contributor
6 years ago

Want to add NEW LINE CHARACTER in mapper

I am trying to add new line character between three of my contents but it is not allowing me. Can anyone tell how new line character can be used in Mapper.
Below is my mapper expression.
$Address+ \n +$Name+ \n+$Age

I want an output like below.
Address
Name
Age

Can anyone suggest something.

Thanks in advance

7 Replies

  • shreegeet's avatar
    shreegeet
    New Contributor II

    have you tried this–> $Address+ "\n" +$Name+ "\n"+$Age

    • mohit's avatar
      mohit
      New Contributor

      Yes, I tried this but it reads this as string write down the same in the output.

      • myeddula's avatar
        myeddula
        New Contributor

        Try this code you will get a solution :$Address+’ \n’ +$Name+ ‘\n’+$Age

  • Ramesh's avatar
    Ramesh
    New Contributor

    Is this solution working ? Because I have tried with similar manner but it is adding \n to my string

  • Ramesh's avatar
    Ramesh
    New Contributor

    Team, thanks a lot for your reply, it is working now

    • cbot412's avatar
      cbot412
      New Contributor II

      How did you fix it? I still get \n