copies an item to a new document
Subject: Copies an item to a new document.
What is the question here?
Subject: RE: Copies an item to a new document.
the question is: how can i copy an item from the fields to new document fields
example i have a form1 and the field name is employee i want to copy the field name employee to another form and paste it from the 2nd form of the field which is the field name is name of employee
Subject: RE: Copies an item to a new document.
Well…why not say that in the first post?
To copy an “item” (field) from one document to another in LotuscScript, you would use the CopyItemToDocument method of the NotesDocument class
EG:
dim doc1 as notesdocument
dim doc2 as notesdocument
(set up the 2 documents - doc1 is source, doc2 is target)
dim item as NotesItem
set item=doc1.GetFirstItem(“employee”)
if not(item is nothing) then
call item.CopyItemToDocument(doc2, “”)
End if
To do this in @formula, you will probably need to set up a view to get the value using an @DbLookup and then use @SetField with the resulting lookup value
Mike
Subject: RE: Copies an item to a new document.
where i can paste that code because im a beginner of using a lotus notes…
Subject: RE: Copies an item to a new document.
How are you expecting the operation to perform the copy to happen? The clicking of a button? A scheduled agent? When a document is saved or created?
This will determine where to put the code (bear in mind that is only a snippet of the code as you will have to get a handle on the two documents in question)
Subject: RE: Copies an item to a new document.
there is a error…the code
form1
firstname ________________(example i input “mike”)
form2
employeename mike(paste from form1)
i want like this… sory for more asking a question because im a beginner of using this kind of program…
Subject: RE: Copies an item to a new document.
Sorry, I really don’t understand
You say an error in the code. Which code?
At what point do you want the value from form1 to be copied to form2?
Subject: RE: Copies an item to a new document.
I really hate to say this, Mike, but I think you’re in over your head here. The OP seems to have so little platform knowledge that he (?) doesn’t know how to ask the question he needs answered. It LOOKS like we might be talking about inheritance here, but it’s impossible to tell.
Jayhson – you really need to take a course or sit down with someone who has done this before. It doesn’t take long to learn the basics (it took me an afternoon), but that’s if you can see it in front of you and can ask questions as you go. You can try to learn from books or from the Designer Help database, but that’s doing things the hard way.
Subject: RE: Copies an item to a new document.
Excellent post Stan.
Jayhson - it is good advice. It is impossible to learn the product just from asking question after question in this forum (this would be true of any product) without a basic understanding of the structure which in turn, will allow you to ask better questions