cancel
Showing results for 
Search instead for 
Did you mean: 

Inline function errors when the string value contains special characters

Not applicable
12 2 3,673

When using an inline function with a special character inside the string value you may receive the following error:

“Error retrieving context data. Error executing inline function. Check that the correct arguments have been passed to the function”

This error indicates that the inline function expects arguments after a special character. This can happen due to the code behind the function. As you can see here in this example Xquery inline function which is similar to ours, arguments are separated by special characters:

declare function functx:trim
  ( $arg as xs:string? )  as xs:string {
   replace(replace($arg,'\s+$',''),'^\s+','')
} ;

(NOTE: This is not the actual code used in our function)

In order to get the function to ignore the special characters inside the string value simply add the {TextStart} and {TextEnd} tags to your value inside the function. You will have to configure your inline function to look something like this: fn-Trim({TextStart}stringvalue{TextEnd})

The {TextStart} and {TextEnd} tags should ensure that the inline function does not parse your string looking for arguments and ignores the special characters.

Cheers,

Andrew Beals

2 Comments
ivan_yankulov
Nintex Newbie

Hello,

Was this fixed at some of the newer releases?

My customer is hitting this issue with nintex 2010 2.3.7.0 and I cannot reproduce this with 2.4.8.0.

The are using fn-XmlEncode workflow inline funstion.

Was this fixed at some point? It is very critical to know if we can resolve this issue by upgrading Nintex, as the function is used in UDA that is used in very large number of workflows.

jackgelo
Nintex Newbie

Hi Ivan,

I don't know if something is changed in the functions but, if the customer was already using the {TextStart} .. {TextEnd} solution, I don't think it will break something if updated to a newer version, because these placeholders are only making more explict the fact that the text between them is the text that has to be processed by the function, it does no more than that..