Expand my Community achievements bar.

SOLVED

CRLF at the end of the concat string

Avatar

Former Community Member

Hi,

this might be a stupid question, but if I use setValue with string function concat(str1,str2,str3) how do I add CRLF to the end of concated string so I can write it in the filesystem to the new line in a log file (writeString component).

Thanks for hints,


Jan

1 Accepted Solution

Avatar

Correct answer by
Level 10

It's not stupid at all.

You can't. You have to use the Execute script to add CRLF characters.

Jasmin

View solution in original post

3 Replies

Avatar

Former Community Member

Currently I am using the Execute Script component with following script:

import java.lang.String;

String text1 = patExecContext.getProcessDataStringValue("/process_data/@str1");
String text2 = patExecContext.getProcessDataStringValue("/process_data/@str2");
String restext=text1+" | "+text2 + "\n";

patExecContext.setProcessDataStringValue("/process_data/resstr",restext);

J.

Avatar

Correct answer by
Level 10

It's not stupid at all.

You can't. You have to use the Execute script to add CRLF characters.

Jasmin