When working with LotusScript to access the ColumnValues (a variant array of values accessed via a NotesDocument or NotesViewEntry) some of the array elements may contain embedded arrays within one or more elements. eg:
doc.ColumnValues(0) = "A"
doc.ColumnValues(1) = ["A", "B"]
doc.ColumnValues(2) = 4
...
Is there a way to assign all the array values to an array in one go? If you assign the ColumnValues array to a variant variable, then this only works provided no array data is embedded within the arrays elements, ie: ColumnValues(1) = "AB" not "[A,B]" eg:
dim v as variant
v = doc.ColumnValues
If an array is present, this assignment fails, but works if all elements are scalar. One workaround is to ensure that all ColumnValues are scalar (not arrays), but this cannot be guaranteed. The only other workaround I have is to iterate over all ColumnValues and check for an array:
For i = 1 to ubound(doc.ColumnValues) 'or other columcount var!
v=doc.ColumnValues(i)
if isarry(v) then
a=join(v,";")
else
a=v
end if
Next
The above works but is very slow for many columns, does anybody have an alternative approach?