January 27, 2023

AppendVr - XpressDox

Append values to variables in your XpressDox Document Automation template

The AppendVr and PrependVr functions provide less cumbersome syntax for appending or prefixing values to variables than using SetVr to do this.

Prior to these two functions, suppose you wanted to concatenate a pipe symbol (|) and a data element value (data element Name) to the end of a variable called List.  This would be done as:

«SetVr('List',concat(GetV('List'),'|',Name))»

Using AppendVr, the same thing is accomplished like this:

«AppendVr('List','|',Name)»

PrependVr works in an analogous way, but inserts the values in front of the value of the variable:

«PrependVr('List',Name,'|')»

will put the value of data element Name, followed by a pipe, in front of the value of variable ‘List’.

Be aware that both of these functions will remove the entire paragraph in which they appear from the merged document. Just as SetVr does.