Limit on COLUMNVALUES array?

I have a view with 33 columns, which I'm accessing remotely via VBA (to read the data into a spreadsheet).
The problem I have is that one of the columns always seems to be missing when open the view up using VBA. Is there a limit to the size of the COLUMNVALUES array?

Dim objNotesSession     As Object       'The Lotus Notes session
Dim objNotesDatabase    As Object       'The Lotus Notes database
Dim objNotesView        As Object       'The Lotus Notes view
Dim objNotesDocument    As Object       'The Lotus Notes document
Dim varColumnValues     As Variant      'Holds the data stored in the notes columns
Dim lngRecordCount      As Long         'The number of records returned
Dim lngCounter          As Long
Dim rs As Recordset
Dim i As Integer
Dim y As Integer
Set objNotesSession = CreateObject("Notes.NotesSession")
Set objNotesDatabase = objNotesSession.GETDATABASE("myServer","myDb")
Set objNotesView = objNotesDatabase.GETVIEW("myView")
Set objNotesDocument = objNotesView.GETFIRSTDOCUMENT

lngRecordCount = objNotesView.TOPLEVELENTRYCOUNT
For lngCounter = 1 To lngRecordCount
        'Get the next document
        Set objNotesDocument = objNotesView.GETNTHDOCUMENT(lngCounter)
        'Move the column values into an array
        varColumnValues = objNotesDocument.COLUMNVALUES
        For i = 0 To UBound(varColumnValues) - 1
             'Store the value somewhere
        Next i
Next lngCounter
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Here is what you can see as far as limits are concerned

Array storage size      Limited by available memory

Number of elements      Determined by memory available for data, and by the storage size of each element of the array, which varies with the array data type. For example, a Long one-dimensional fixed array declared in type scope can have 16,128 elements. (The total storage size available for fixed-size data in module scope is 64K bytes, and a Long element requires 4 bytes for storage.)

How many columns are allowed in a view?      289 ten-character columns; dependent upon # or characters per column

So you seem to be in good shape.

as far as i know, if the column values is something like "# in view" or some @functions like @docnumber then columnvalues will not see it.

This might be ur problem

HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

oops, I almost missed the essential part of the question. Well as Partha has described @IsExpandable and @DocNumber and CONSTANTS doesn't show up while using ColumnValues

Let me give you full list of functions that doesn't show any values using columnvalues property

@DocChildren, @DocDescendants, @DocLevel, @DocNumber, @DocParentNumber, @DocSiblings, @IsCategory, @IsExpandable

Also the constant such as number (999) or "User Name: ."  are all discounted. But if a column contains a formula that happens to return the same result for every document, it is not considered a "constant" !

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I believe this is not documented., This is documnted only for dblookup and dbcolumns ., but i am sure columnvalues is not considered also

you try it. it holds good for columnvalues too.. underlying principle either it is script or formula Notes is one and as far as I know function mostly consistent.

Here's the culprit:

        For i = 0 To UBound(varColumnValues) - 1

Why -1 ?  It should be:

        For i = 0 To UBound(varColumnValues)

If you have three columns, then lbound(cv) is 0 and ubound(cv) is 2 -- not 3.  The ubound is the upper limit of the array, NOT the count of array elements.

So, if you go to ubound(cv)-1, you will never reach teh last column of the view.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.