I am attempting to use the inline function fn-remove to trim excess text from a field that may have a large amount of text. My objective is to keep only the first 200 characters and assign them to variable txtRiskDescription.
I use the same series of actions described in this post: http://connect.nintex.com/forums/thread/22593.aspx
My field is read from a list into variable txtRiskDescription, and may contain one or many sentences, including punctuation.
I did discover that I have to use {TextStart} and {TextEnd} in order to get the Length (Step 1 from the example at the link above) because my data may have commas or other special characters: fn-Length({TextStart}{WorkflowVariable:txtRiskDescription}{TextEnd})
In some cases I will have only 10 characters, and in some cases up to 10000, so I use fn-Length and an If/then to test for greater than 200 characters, and if so, execute the fn-remove.
In my loop (step 4) my configuration to remove text is: fn-Remove({WorkflowVariable:txtRiskDescription},200) ......... assigned to back to the same variable txtRiskDescription
I output txtRiskDescription into the history list log to check the new truncated value. In cases where there are less than 200 characters, the output is the contents of txtRiskDescription (as expected).
In cases where there are more than 200 characters, the output is: fn-Remove(<div>Text here that has been truncated to 200 characters
I underlined the extra characters that are being assigned to the txtRiskDescription variable. Why are these characters "fn-Remove(<div>" present? I do not see the error in my configuration (above, step 4). ???
Thanks