Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

FileUtilsService Write String New Line Character

Avatar

Former Community Member

Hi All,

SITUATION:

Writing a custom log file using the Write String service operation.

Everytime an event occurs, i want to insert a new line, with date time stamp, details etc.

PROBLEM:

In the "value" property of the "write string" service operation... im inputting my relevant data but dont know how to indicate a new line

WHAT I TRIED:

I've tried every form of new line character i know: \n, \r, <BR>, \u0000a, \u0000d, ACSII, CRLF, etc, etc... none of them works.

WHAT I FEAR:

the exact same situation as http://forums.adobe.com/message/2780658#2780658 ... with a fairly definite answer

I'm hoping i dont have to go this LONG ugly scary route.

WAY FORWARD:

Your thoughts, answers, suggestions....

Thanking you all in advance.

1 Reply

Avatar

Former Community Member

if going the "executeScript" way....

this code worked for me:

===========================

import java.lang.String;

String vLogEntry = patExecContext.getProcessDataStringValue("/process_data/@logEntry");
String vLogEntry = vLogEntry + " \r\n";

patExecContext.setProcessDataStringValue("/process_data/@logEntry", vLogEntry);

=================