Domino Code Fragment

Code Name*
Implode Function
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.14.70.203
Description*
This function takes in a Notes Item in the signature line and returns the item as a string value the values are separated by a comma but that can be changed to any delimiter the user wishes to use. Additional checks for author and such may also be incorporated if the developer so feels.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
' Function to implode a passed item so we can pass it as a string
Function Implode(Item As Variant) As String
Dim sReturnString As String
If Not (item Is Nothing) Then
Select Case item.Type

Case ERRORITEM ' Field might contain error so we ensure error trapping here
sReturnString = ""

Case UNAVAILABLE ' Field might not exist so we ensure error trapping here
sReturnString = ""

Case RICHTEXT ' Field might be richtext so we get the formatted text
sReturnString = item.GetFormattedText( False, 0 )

Case DATETIMES ' Field might be DATETIME so we get the datetime value as text string
sReturnString = item.DateTimeValue.LSLocalTime

Case NUMBERS ' Field might be numbers so we get the converted text of the values
Forall v In item.values
'-- Concatenate each element in item to sReturnString
If sReturnString = "" Then
sReturnString = Cstr(v)
Else
sReturnString = sReturnString & "," & Cstr(v)
End If
End Forall

Case TEXT ' Field might be numbers so we get the text of the values
Forall v In item.values
'-- Concatenate each element in item to sReturnString
If sReturnString = "" Then
sReturnString = v
Else
sReturnString = sReturnString & "," & v
End If
End Forall

Case Else
sReturnString = ""

End Select

Else
sReturnString = ""
End If

Implode = sReturnString

End Function