webCOMAND

#APPEND

Appends (adds) text placed in the #APPEND block to the end of the Variable's existing contents.  Unlike #ASSIGN, the initial value held by the variable is not replaced.

Prototype

#APPEND($variable, $separator = '') ... #ENDAPPEND

Parameters

  • variable - Any information inside of the #APPEND block is added to the end of the specified variable.
  • separator - Optional separator string to add between existing text in the variable and the new text, but only if there is existing text.

Example

#* Append one string to another for: This is the end of a sentence *#
#ASSIGN($Message, "This is")
#APPEND($Message) the end of a sentence.#ENDAPPEND
$Message

#ASSIGN($NL,'\n')
#ASSIGN($CSV,'')
#LIST(Results)
    #APPEND($CSV, ',')$Value1#ENDAPPEND
    #APPEND($CSV, ',')$Value2#ENDAPPEND
    #APPEND($CSV)$NL#ENDAPPEND 
#ENDLIST
#OUTPUT('results.csv', $CSV)