Below is an example of a connector expression that triggers the bug (note that it contains both the $ and \ characters).
The expression shown above is using regex to see if the attachment file name ends with .png. In this case, because there is a $ character, an error will prevent the tree from being saved.
Suppose we just removed the $ from the connector expression (shown below).
In this case, the tree will be saved but the \ character gets lost in the process resulting in the following expression.
The backslash being lost changes the expression dramatically and in most cases renders it completely invalid.
The best solution is to fix the issue within Kinetic Task, and this will be done for the v3.1.4, v3.2.2, and v4.0.3 releases, but until then we can try to apply workarounds to avoid this bug.
Below are a couple of workaround examples, including one for the case above.
The example shown above (regular expression) is a common case where we might find $ and \ characters in the connector. In regex the $ character is used to match the end of a line, in the case above we used it to determine whether or not the file name ends with a certain sequence. Ruby actually provides a built-in way to do this shown below.
Since this expression does not use regex we can perform the same task as above without the use of the $ or \ characters.
Another case might be to add a $ to another variable. In this example we are simply prefixing the Cost answer with a $ character.
"$" + @answers['Cost']
If we are using the $ in a String in the expression we can replace it with the ASCII representation. Show below is an equivalent expression.
# 36.chr returns a dollar sign. This is a workaround for a Kinetic Task bug # dealing with dollar signs in connector expressions. 36.chr + @answers['Cost']
Note that there was a comment added to the expression because 36.chr is extremely cryptic and no one would know its purpose if it were not commented. We would strongly suggest adding this comment wherever you use this particular work around.
If you have an expression that cannot be solved by the workarounds above please let us know and we will do our best to help you solve your case.