Discussion

Inserting a carriage return

Hi,
While setting a property value in an activity, is there a way to insert a carriage return other than using the tag <BR>?

For ex : say the value of Str1 is "hello there."
I want it to be displayed as: "hello
there"

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

January 31, 2012 - 1:58am

You can use the below syntax
Property set -> “Hello \n there”

During display if you are using use a read-only text area it will display as “Hello there” and if you are using a editable text area it will be display as per your requirement.

January 31, 2012 - 10:15am

quote:


Originally posted by MANISHDAS007

You can use the below syntax
Property set -> “Hello \n there”

During display if you are using use a read-only text area it will display as “Hello there” and if you are using a editable text area it will be display as per your requirement.


Does the newline character work inside of the quote string?

Should it be:

Property-Set -> "Hello" + \n + "there"

I honestly have no idea.

January 31, 2012 - 11:07am

it will work inside double quotes. I tried it during one of my POC and it was working fine.

January 31, 2012 - 4:07pm

Cool to know. Thanks!

February 3, 2012 - 10:33am

Manish..the text input property is read-only and I do not have the access to change it..so is there a work around for that ?

November 30, 2016 - 4:09am

In Pega 7 the proposed apprach works for both read and read-only fields.