Question
ING
BE
Last activity: 11 Nov 2016 15:12 EST
How to print to a text file with line breaks
Hello all,
I have a Connect-File rule with which I am trying to print the values of a clipboard property to a text file. However, I am not able to force new lines. I was wondering if this is possible when appending to a clipboard property.
I have tried to append both ‘/n’ and “<br>” but none worked. Could you please advise?
Attached is the screenshot of the code.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
GB
I'm guessing here : but could you try adding '\r\n' : and see whether you need both CR + LF to make the file look right on Windows.
If that doesn't work: maybe PRPC is stripping the newline characters from the end of text properties ? (But that's my second guess here....)
Pegasystems Inc.
GB
Did you mean to write '/n' (forward-slash n) in your post here ? it should be '\n' (back-slash n) ? Just checking in case that is the reason it isn't working ?
ING
BE
yes sorry that was a typo - please read as backward-slash '\n'
Accepted Solution
Pegasystems Inc.
GB
I'm guessing here : but could you try adding '\r\n' : and see whether you need both CR + LF to make the file look right on Windows.
If that doesn't work: maybe PRPC is stripping the newline characters from the end of text properties ? (But that's my second guess here....)
ING
BE
John, "\r\n" has worked like a charm! Thanks a lot for your help.
Pegasystems Inc.
US
ING
BE
Hi Ravi, thanks for your response. Not sure how it worked for you but it didnt work for me. However, above John's suggestion did the job!
Verizon Wireless
IN
The above solution is not working in pega 7.2 version .
I have tried using both \n [or] \r\n in the activity but no lcuk. any thoughts ?