Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

lotus script - pulling an item directly into an array

Posted on 2009-02-10
7
Medium Priority
?
330 Views
Last Modified: 2013-12-18
I have an action that pulls data from forms in a view. One of the fields I pull is a list of names. Currently I pull these into a delimited string first then into an array where I sort. This code is duplicated for a couple of other fields. I think I s/b be able to pull directly from the field into the array, since I am pulling it from a notesitem to start with, and speed things up. Assuming I am correct could someone provide an example?

Thanks
0
Comment
Question by:BillTr
  • 4
  • 3
7 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 1500 total points
ID: 23609425
>> I have an action that pulls data from forms in a view.
Small correction: a view doesn't contain forms, but documents.

Indeed, for the values ARE an array.

Examples:

Dim doc As NotesDocument
Dim v As Variant

v= doc.GetItemValue("YourField")

or

Dim item As NotesItem

Set item= doc.GetFirstItem("YourField)
v= item.Values

In both examples above, v is an array of the values in the item. If there's only a single value, it is in v(0).
0
 

Author Comment

by:BillTr
ID: 23613047
Is there a way to get the last position (or last value) in the array/variant without looping through and counting them?


0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 23613132
For i= 0 To Ubound(array)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:BillTr
ID: 23614842
Isn't this is just another loop?  I was trying to get the count of records in the array without looping.
Not possible?


0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 23618157
It's the function Ubound(array), but I decided to give you an example (lack of time, very sorry, and now you gave me a B...)
0
 

Author Comment

by:BillTr
ID: 23676367
I did end up using this and I like it. I tried to up the rating, let me know if it doesn't take.


Thanks!!!!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 23676442
No problem, don't worry. Next time better!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

810 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