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

Lotus Script Variant Data Type Problems

373 views
Skip to first unread message

Gregory Radcliff

unread,
Jul 23, 1996, 3:00:00 AM7/23/96
to

I'm currently accessing a field value from one document and moving that value to another
document via script. When I scan the document items using the Script debugger it
indicates that the field value is a variant data type. On the actual form, the field is
defined as an editable number field (fixed with one decimal place). I would like to
perform a multiplication function on the number, however script will not allow this as
it is a type mismatch.

Does anyone have any ideas as to why script is seeing this data as a variant instead of
a string or integer, or how I might be able to convert the item from a variant to an
integer in order to perform the multiplication?


Eric Lepage

unread,
Jul 23, 1996, 3:00:00 AM7/23/96
to

Hi Gregory!

I don't know either why LotusScript is seeing a number as a variant
(another one of those "feature"!) but you can use the Val() function to
convert the annoying variant to a number and treat it as a number within
your code.

Eric Lepage

champlin

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to

Greg,

It may be seeing it as a Variant if it can contain more
than one value. To get around this you can just take the
first position in the Variant string and convert it to an
integer.

temp=Cint(var(0))

Jon


Anil Vartak

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to

Hi,

Has the field you are referring to been initialized ? If it does not
have any initial value, as far as I remember, it will be of data type
variant.

Anil Vartak

Daniel Hernandez

unread,
Aug 2, 1996, 3:00:00 AM8/2/96
to


Gregory Radcliff <GRad...@gnn.com> wrote in article
<31F516...@gnn.com>...


> I'm currently accessing a field value from one document and moving that
value to another
> document via script. When I scan the document items using the Script
debugger it
> indicates that the field value is a variant data type. On the actual
form, the field is
> defined as an editable number field (fixed with one decimal place). I
would like to
> perform a multiplication function on the number, however script will not
allow this as
> it is a type mismatch.
>
> Does anyone have any ideas as to why script is seeing this data as a
variant instead of
> a string or integer, or how I might be able to convert the item from a
variant to an
> integer in order to perform the multiplication?

I've noticed something similar where a RT field with a default value
somehow appears as a
text field after a document is created via script. If you refresh the
document you may find that the fields
revert back to their true datatypes. I've had more problems with RT fields
than just about anything
else. Of course I wouldn't trade Notes for anything. :-)

danny


0 new messages