Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

CRLF at the end of the concat string

Jan_Babicky
Level 3
Level 3

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
Jasmin_Charbonn
Correct answer by
Level 10
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

0 Replies
Jan_Babicky
Level 3
Level 3

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.

Jasmin_Charbonn
Correct answer by
Level 10
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