How pass variable from underlying form to dialog box?

How pass variable from underlying form to dialog box? I tried environment variable, but I found that environment variable has limit size. so I cannot use environment variable… Any idea that code can pass variable from underlying form to a dialog box?

Subject: How pass variable from underlying form to dialog box?

Create a document to use as the dialogbox, and insert your variable as an item. When the dialog closes let the document pass out of scope and disappear (unless you want to save it of course).

dim ws as notesuiworkspace

dim s as notessession

dim db as notesdatabase

dim dlg as notesdocument

set ws = new notesuiworkspace

set s = new notessession

set db = s.currentdatabase

set dlg = db.createdocument

with dlg

call .replaceitemvalue(“Form”,“dlgMyDialogForm”)

call .replaceitemvalue(“var1”, )

end with

call ws…DialogBox( dlg.getFirstitem(“Form”).text , [autoHorzFit] , [autoVertFit] , [noCancel] , [noNewFields] , [noFieldUpdate] , [readOnly] , [title$] , dlg , [sizeToTable] , [noOkCancel] , [okCancelAtBottom] )

etc

Subject: How pass variable from underlying form to dialog box?

Instead of a variable, use a hidden field that contains the value of the variable. If you include the field on both the main form and the form or subform you’re calling in the dialogbox, the value will be available to you, since a dialogbox by definition opens the selected document in a different form.

Subject: And it can be a CFD field, so that it doesn’t ever get saved.

Subject: And it can be a CFD field, so that it doesn’t ever get saved.

You mean that code will save variable to hidden field in underlying form and a dialog box will get variable from the hidden field. Is that correct? How can dialog box get variable from different form/underlying form? give me some example of code… thanks

Subject: Computed For Display