Interesting...
Original Message:
Sent: 08-16-2023 08:16
From: Sean McGrath
Subject: Escaping characters in Participant Data
Append() has less overhead than using +. I also prefer Append() because it can handle NOT_SET. So if you have Append("Some String ",Flow.Variable) and the variable has a value of NOT_SET then the Append() won't crash your flow.
------------------------------
Sean McGrath
TTEC Digital, LLC fka Avtex Solutions, LLC
------------------------------
Original Message:
Sent: 08-15-2023 07:44
From: Paul Simpson
Subject: Escaping characters in Participant Data
Thank you!
This has been driving me crazy 🤬 I've been swapping around the "\r\n", assigning to a variable first and all sorts!
Quick question (for you or anyone else with knowledge of these things). I see you are using "+" to concatenate strings, I tend to use Append(). Is there a performance / functional difference between the two?
i.e. is
"Hello "+"World"
preferable to
Append("Hello ", "World")
------------------------------
Paul Simpson
Eventus Solutions Group
Original Message:
Sent: 08-15-2023 06:28
From: Waqar Mahmood
Subject: Escaping characters in Participant Data
Hi there,
We use a similar approach for our logging: a common module that (1) fetches the value of participant data, (2) appends a string at the end of its existing content, and (3) writes the updated string to the participant data.
Our expression to update the participant data is:
Task.existingValue + Common.SectionName + " : " + Common.newString + "\n"
An example expression used to create Common.newString is:
"\n\tChecking if new number was dialed" +
"\n\t\tCalledAddressOriginal [" + Call.CalledAddressOriginal + "]"
What we see in the log looks like:
Some Section Name :
Checking if new number was dialed
CalledAddressOriginal [+123456789]
We see the new lines and tabs only if we click on the copy icon (which appears at the top left of the content of the participant data when you hover over it) in the Interaction Details and paste the contents into Notepad++. We do not see the formatting in the Interaction Details page when we expand the contents of the participant data. We do not see the formatting if we copy by manually selecting the contents of the participant data using the mouse.
------------------------------
Waqar Mahmood
Herbalife International of America, Inc.