Sharepoint SIG

Thoughts and ideas from your SharePoint support team

Nintex Workflow and the Trim function


Nintex Workflow includes a Trim function that can be used to strip leading and trailing blanks from strings.  In most cases, Trim works as expected.  However, if the string that you are trying to trim contains a comma, the workflow fails with the error:

“Error retrieving context data. Error executing inline (FN-Trim) function. Check that the correct arguments have been passed to the function”

Nintex support was able to confirm this behavior and gave me a workaround.

To use the Trim function, click the Trim function in the “Inline Functions” tab.  It puts the following text into the builder window:


At that point, insert the name of the variable containing the text to trim between the brackets.  Before closing the builder, surround the variable with {TextStart} and {TextEnd}.  For example, if trimming the contents of a  variable called Notes, use:


I have asked Nintex to consider changing their implementation of Trim so that it is not necessary to use {TextStart} and {TextEnd}.  It is on their list but there is no indication of when this might be done.

Leave a Reply