andrew.beals@nintex.com

Inline function errors when the string value contains special characters

Blog Post created by andrew.beals@nintex.com Support on Feb 25, 2015

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

Outcomes