Solved

moving the columnvalues array into a VB array

Posted on 2004-10-12
4
288 Views
Last Modified: 2013-12-18
Hi folks
I'm writing a VB app that loops through the documents in a Notes view as follows and moves the values in the view into a variant array using .ColumnValues
    While Not oDoc Is Nothing
        Dim s() As Variant
        s = oDoc.columnvalues
        'manipulate s here
    Wend

However when it comes across views that contain saved conflict documents it does bizarre things like creating a 2d array for certain fields
ie. my array s when there is no conflicts
s(0)  = "blah"
s(1) = "blah"
s(2) = "blah"
s(3) = "blah"

with conflicts it might load up my variant array as follows
s(0) = "blah"
s(1) = "blah"
s(2)
s(2)(0) = "blah"
s(3)  = "blah"

I however dont know how to handle this as, if I refer to s(2)(0) each time, then my program will crash when it doesnt have a value ?
and s(2) on this occasion doesnt have a value

I hope this makes sense

Any help appreciated
Paul

0
Comment
Question by:skintpaul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 300 total points
ID: 12286531
Well, that's because the columnvalues in theirselves can be arrays too.

Isn't there something like a normal variant in VB ?  Try
dim s as variant

This should create a variant, of type array, with values of type variant too (that can be arrays themselves)

cheers,

Tom
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12286651
Please post your relevent code.
0
 

Author Comment

by:skintpaul
ID: 12286772
Folks
I found the answer. I'm going to use ISarray(s(x)) to determine how to handle each item of the array.

Thanks for your efforts. I have another question that I'm about to post regarding Notes View Column names

Paul
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12290757
Actually, that's the way it is handled in LotusScript as well.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question