Urgent--Need to get values from the embedded view and pass it to the form field

Hi All,I have a 2 forms.

Form1 and Form2.

In Form1 I have many fields and many embedded views.

In form1 i have button to compose form2.

If I compose form2 , all the values from Form1 should be inherited to Form2 .

I need to use Lotus script for this.

SInce I am a Beginner of Lotus notes and Lotus Script I dont know How to do that.

Can Any one Help ME out With Code to solve this.

I have some Basic Idea… But dont know where to start and How to proceed…

  1. I need to pass the current document as my composing form.

  2. Need to get all the documents of the embedded view in collection . and getting the document using the key,

3.I need to have loop for setting the fileds in the Form2 from Form1.

Take first document get fields set it to the form2 field.

Next doc.

Like this For each Emmbedded view I need to have seperate loops.

But I dont know how to start with this in Code and proceed.

CAn Any one HElp Me PLease.

Thanking You in Advance.

Cheers,

Sam Mathew

Subject: Urgent–Need to get values from the embedded view and pass it to the form field

Sam,

What you want to do is pretty simple. Since you are a newcomer here I will be polite with this warning - putting “urgent” in your topic line will accomplish nothing other than irritating people. They don’t care how urgent your problem is. You are no more or less important than anyone else here and the people who volunteer to answer questions on here will answer you if they have an answer for you.

Here is the code that you are looking for:

Dim ws as New NotesUIWorkspace

Dim newdoc as NotesDocument

Dim currdoc as NotesDocument

’ First get the current document

Set currdoc = ws.CurrentDocument.Document

’ Now make your new document and copy all fields into it

set newdoc = currdoc.ParentDatabase.CreateDocument

currdoc.CopyAllItems newdoc

’ Change the form name and open for editing

newdoc.Form = “”

ws.EditDocument True, newdoc