Manage Learn to apply best practices and optimize your operations.

The Simplest LotusScript Version of @Explode

This is a very simple way to parse through a text string and separate it into a multivalue array.

Using a specific character as a separator, ";" for example, the code separates the string into a multiple elements of an array. In this example, the results are as follows:

FieldA = "value1;value2;value3"

FieldB(0) = "value1"
FieldB(1) = "value2"
FieldB(2) = "value3"

TempStr = FieldA 'Get string to parse.
'Can also be a single value field
j = 0
Redim NewArray(j)
For i = 1 To Len(TempStr)
' Parse group names into individual elements in an array
char = Mid(TempStr,i,1)
'Search for separating character--a semicolon for example
If char <> ";" Then
v NewArray(j) = NewArray(j) & char
j = j+1
Redim Preserve NewArray(j)
End If
Next i

FieldB = NewArray 'New array of values

Dig Deeper on Domino Resources - Part 5



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...