in my workflow, I want to display a string in a text view node. The string consists of javascript code, delivered to the node via a variable and displayed through the expression $$["myVariable"]
I could narrow the problem down to this example, where the string configured in the variable creator node is only a single $ (while in my code snippets, the $ typically occurs in regex definitions.)
is this a known bug, or a general limitation we have to live with? It seems that the text view node interprets the $ character as a regex group denomination, but in my view, the string should be interpreted and displayed literally?
I wasn’t able to replicate the issue you described in your post. As the screenshots show, it worked fine on my end using the Variable Creator node and the Text View.
If you could upload the flow you’re using, we might be able to help you troubleshoot it further.
I was able to reproduce the error you mentioned with v5.4.3 and created a ticket (internal reference UIEXT-2664).
One workaround could be to build the entire content HTML into the flow variable.
the problem was that I had the whole content (up to 30.000 characters of code) in the variable and had about 400 different such code snippets, of which 3 failed in the workflow because they contained $. an example:
var NodeID = node.getID();
var IDpattern = new RegExp("^[0-9]+$", "I");
if (NodeID.match(IDpattern)){
I suspected some special character as a cause and finally came up with the $. As a workaround I searched/replace the “$” with “\$” (expression node) which remedied the case…
thanks for the reply. there is a misunderstanding however: the expression $$["myVariable"] in the text view node is the placeholder (not the actual value) for the variable in quotation marks. If the string delivered by that variable/expression happened to have the character $ within, the node fails.