Question
UnitedHealthcare India PVT Ltd
IN
Last activity: 7 Feb 2018 4:43 EST
Newline using "\n"
Does pega support "\n" for newline? I want to add a newline to a property and I can't use "\r\n" because of requirement constraints. I tried "\n" on a java compiler and it worked. But in pega it is not adding a newline by using property-set method or java method.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Adding the use case attachment.
Pegasystems Inc.
IN
Hi,
Pega will support \n and all other escape characters.
Here is the proof:
1.Created activity to test
2.Here is the result - clipboard page:
And the java output is below:
Hi,
Pega will support \n and all other escape characters.
Here is the proof:
1.Created activity to test
2.Here is the result - clipboard page:
And the java output is below:
-
Deepthi Sree Chintalapati
UnitedHealthcare India PVT Ltd
IN
'\n' is not adding new line when written to a file. I'm writing to a .dat file. Please refer attached screenshots below.
Pegasystems Inc.
US
Hi Sarthak,
Tried the same use case which you showed in the screenshots and the output is being stored with the new line functionality in the text file. As you are viewing the file content in Notepad you are not able to see the text in the new line, try to open it in advance editor like Notepad++ then you can view it as expected.
Hope this helps you.
Regards
Mahesh
Accepted Solution
Pegasystems Inc.
US
Adding the use case attachment.
-
Deepthi Sree Chintalapati Khushbu kumari Bathula Srinivas Reddy Riji MJ Bikash Nayak
UnitedHealthcare India PVT Ltd
IN
Thanks a lot Mahesh. It would have taken me forever to figure that out.
-
vijaya bhaskarreddy
Pegasystems Inc.
US
You're welcome Sarthak.
-
vijaya bhaskarreddy