for condensing a large character string and removing any carriage returns (such as in a comments field).
Function shortcomment(byval commentstring as string, stringlength as integer) as string
if commentstring="" or isnothing(commentstring)
commentstring=replace(commentstring, chr(10)," ")
if commentstring.length >stringlengthcommentstring=left(commentstring, stringlength) & "....."
where 10 is the condensed length