Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating a list in LotusScript

1,147 views
Skip to first unread message

Lando Chez

unread,
Nov 23, 2001, 3:01:45 AM11/23/01
to
HI

I am using the following LotusScript code to hardcode a list.

Dim tablelabels(9) As String
Set tablelabels = ("NAW":"Burgerlijke
Staat":"Partner":"Overeenkomst":Salaris":Leningen":"Lease
Auto":"Onkosten":"Verzekeringen")

But this gives me an error. How can I assign hardcode a list to a variable?


Wilbert Leenders

unread,
Nov 24, 2001, 2:08:31 PM11/24/01
to

Try this:
Dim tablelabels(9) As String
tablelabels(0) = "NAW"
tablelabels(1) = ""Burgerlijke Staat""
tablelabels(2) = "Partner"
..
..
tablelabels(8) = "Verzekeringen"

Now it is an array!

Karin Leenders

Lando Chez schreef:

Tom Sanders

unread,
Nov 25, 2001, 5:38:04 AM11/25/01
to
What do you want to do? Use a list in LS ? As far as I know, you can't.
Lists go together with Formula language, not with LS. The only thing I can
think of, is that you want to create contents for a field in LS which can be
accessed by a formala as a list. If that is what you want, you can just
create a string with items separated by ":", there's no need for an array.

So, a string like "NAW:Burgerlijke


Staat:Partner:Overeenkomst:Salaris:Leningen:Lease

Auto:Onkosten:Verzekeringen" would do the job.

Tom

Wilbert Leenders <w.lee...@chello.nl> schreef in berichtnieuws
3BFFF03B...@chello.nl...

Dennis N. Yugo

unread,
Dec 7, 2001, 9:41:57 AM12/7/01
to
In article <9tqhle$2nc$1...@news.hccnet.nl>, t.sa...@dgsvisueel.nl says...

> What do you want to do? Use a list in LS ? As far as I know, you can't.
> Lists go together with Formula language, not with LS. The only thing I can
> think of, is that you want to create contents for a field in LS which can be
> accessed by a formala as a list. If that is what you want, you can just
> create a string with items separated by ":", there's no need for an array.
>
I'm afraid that is incorrect. Lotus script has a datatype called a List
(check the Designer help for this).

A list amounts to a dynamic array whose elements are referenced with a
tag name rather than an index. For example (this is copied from
Designer help):
"The following example illustrates how to declare a list, add elements to
it, and refer to those elements. The elements in the list are of one of
the scalar data types (String).
' Make string comparison case insensitive
' in this module.
Option Compare NoCase
' Declare a list洋yList葉o hold first names.
' The list tags will be unique IDs.
Dim myList List As String
Dim newTag As String
Dim newValue As String
' Put some elements in the list.
myList("A1234") = "Andrea"
myList("A2345") = "Vera"
myList("A3456") = "Isabel"
' Ask the user to enter an ID and a name.
newTag$ = InputBox$("Please enter your ID:")
newValue$ = InputBox$("Please enter your first name:")
' Add a new element to the list with
' the user's ID as the list tag and the user's name as
' the value of the new element.
myList(newTag$) = newValue$
Print myList(newTag$)
' Output: the name that the user entered"

All the above is from Deisgner help.
--
Dennis Yugo
Angle-of-Attack Systems
http://www.aoasystems.com

0 new messages