Expand my Community achievements bar.

SOLVED

Concatenate a BLANK line to a text string?

Avatar

Level 8

Hello

Bcz of some reason am implementing the COMMENTS and COMMMETS_HISTORY functionality on my_form with 2 boxes (multiple lines text boxes), well.

Say, user_1 enetred a comment and clicked the provided button (say its name is INSERT_MY_COMMENT_TO-COMMENT_HISTORY_BOX), then the entered comment moved to history box, well.

Now, if again same user (or next user on fly of workflow) enetres another commment and clicking the button, then this also moved to history box, well, but we need a BLANK line between the first comment and 2nd comment for READABILITY purpose, and good look

is it possible by concatenating a blank line to comment_first by user_1, pls. provide me JS code snippet

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 10

Well,

I don't know how you push the comments to the history now, but you generally can add linebreaks with a script.

This could look like this:

HistoryField.rawValue = HistoryField.rawValue + "\n\n" + CommentField.rawValue;

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Well,

I don't know how you push the comments to the history now, but you generally can add linebreaks with a script.

This could look like this:

HistoryField.rawValue = HistoryField.rawValue + "\n\n" + CommentField.rawValue;

Avatar

Level 8

Thank you, i have used the single "\n" it added a a blank line as next immediate line. Thank you

If i use the 2 n's then i got 2 blank lines, then i put only 1, worked, as below

here ist occuring \n is meant for to start the line in next line

Thank you