Solved

doc.fieldname problem

Posted on 2002-07-25
4
182 Views
Last Modified: 2013-12-18
hello experts,
I've a litttle question
I'm writing a lotusscript code, but I've a little problem
Here's an example
' this is oke
fieldname = doc.month(0) 'example may
....
'here goes it wrongs
doc.fieldname = .................

if I write doc.fieldname he's looking in the document to a field called fieldname, but he need to look to a field doc.may because fieldname has the value may
How can I do that ?
doc. + fieldname doesn't work
0
Comment
Question by:magnex
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
zvonko earned 40 total points
ID: 7176764
Try this:
Dim doc As NotesDocument
Dim item As NotesItem
Dim fieldname as String
...
fieldname = doc.month(0)
Set item = doc.ReplaceItemValue(fieldname, "...")

~zvonko

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7176784
This doc.Fieldname = Value works something like this....

if there is a fieldname already in the document then it replaces the value, if there is no field in the document then it creates a new field and puts your value in it.

Hope it helps!
0
 

Author Comment

by:magnex
ID: 7176809
Thanks for the quick answer
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7176854
Thanks for the points Magnex :-)

to Arun: Bro, check my view SELECT formula...

0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 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