When using fn-Substring with a workflow variable that contains a special character (i.e : comma, single quote, double quote, etc), the inline function is not working as expected. This behavior is exhibited by a return of the the function and parameters as an entire string.
Setting a String Workflow Variable named "VarString" to "The following string has a number of special characters, Like: @#%&"
and running the following sub string function:
Returns the following value:
fn-Substring(The following string has a number of special characters, Like: @#%&,10,5)
Depending on case usage, the regular expression workflow action could be utilized instead, or if need be used to remove any special characters from the string. The example below uses the pattern of \w, which will match any alphanumeric character. This will return a string with no special characters.