What problem are you observing?
When working on a workaround for another issue it was determined that we needed to use the Define Variable to replace the “\n” in the original variable with “\\n” in order for the system to parse it correctly. A new Define Variable step was added and the variable named. Then in the editor a new Operator for replace was added, and the values set:
Once Apply was pressed, you can see the resulting escaped values in the right pane:
The remaining configuration was set up like the linked topic above.
When the variable is passed in, it has a value of:
line 1 \n line 2 \n line 3
When the replace processes it, it matches the pattern correctly, but the value stored in the resulting variable is as follows:
line 1 \\\\n line 2 \\\\n line 3
So the replace seems to be escaping the values when it stores the data into JSON, then matching correctly by unescaping the Pattern, but when it does the replace, it does NOT un-escape the Replacement value.
As a workaround to get this to work as desired above, both the Pattern and Replacement need to be set to “\n”
What is the correct behavior?
The resulting variable should have the value the user entered for the replacement, not the escaped value.
What product feature is this related to?
ISC Workflows, Define Variable Operator
What are the steps to reproduce the issue?
See Above