I have a form in that one button is there. On Click of that button i am opening one dialogbox.In that dialogbox i want to access the main form field.Can you please help me out regarding this.
Subject: Accessing field value in dialog box
Are you using Lotusscript for this?
When yes, I can give you some sample code.
Subject: RE: Accessing field value in dialog box
Yes, i am using lotus script.
Subject: RE: Accessing field value in dialog box
Here is an sample of a function that calls a dialog containing a single field, called Language and a hidden fields called Languages:
Function SelectLanguage() As String
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dlgdoc As NotesDocument
Dim languages(3) as string
Set db = session.CurrentDatabase
Set dlgdoc = New NotesDocument(db)
languages(0) = "EN"
languages(1) = "DU"
languages(2) = "FR"
languages(3) = "GE"
dlgdoc.languages = languages
dlgdoc.Language = "-"
If ws.DialogBox("SelectLanguage", True, True, False, False, False, False, "What language?", dlgdoc) Then
If dlgdoc.Language(0) <> "" Then
SelectLanguage = dlgdoc.Language(0)
Else
Messagebox "You did not select a language", 16, "Error"
SelectLanguage = ""
End If
Else
SelectLanguage = ""
End If
End Function
Set the field Language on the dialog to be “use formula for choices” and as value Languages (the name of the selection field).