Pass value from one form to another

Hi,

I have been trying unsuccessfully to pass the string value contained in a field on one form to another form within the same database. I have attempted to use a global variable to achieve this but I am unable to get this working.

An action button on the first form opens up the second form using a simple @command([compose]; “FORM2”) funtion.

All I would like to do is to take a string value contained in a field located on the first form and have this value placed into a field on the second form which is opened by my action button.

This is probably not a complex operation as I am new to Domino Development, but any help would really be appriciated as this is causing extreme frustration!!

Many Thanks

Subject: Pass value from one form to another

Hi there

you could use the @enviroment formula

in you action button

@environment( “yourvariablename”; yourfieldname );

@command( [compose]; “form2” );

and then in form2 for that field, have a default or computed value formula (depending on exactly how you want the field dealt with) of

@environment ( “yourvariablename” )

HTH

cheers

andy G

Subject: Pass value from one form to another

Fastest way to do this is using environment variables. Check the help for @Environment function. So set the environment before composing Form2 and read the environment value in a field on the Form2.

Or using Lotus Script:

Dim ws as New NotesUiWorkspace

dim uidoc as NotesUiDocument

dim doc as NotesDocument

dim uidocNew as NotesUiDocument

dim docNew as NotesDocument

set uidoc = ws.CurrentDocument

set doc = uidoc.Document

set uidocNew = ws.ComposeDocument(“”,“”,“Form2”)

set docNew = uidocNew.Document

docNew.FieldName = doc.FieldName(0)

cheers !!

Ashish