Integra for Notes Banner
  QuickReports Integra4Notes Integra Family of Products



Using the values from the selected document in a custom dialog

The code below is an example of how you can set the values from the selected document in a custom dialog box displayed to the user.

This can be achieved by adding the following code to the POSTOPEN event of your dialog box form:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim srv As String
Dim pth As String
Dim docid As String


'These environment variables store the source database server and path and the Doc ID of the selected document
srv = session.GetEnvironmentString("IntegraCurrentServer")
pth = session.GetEnvironmentString("IntegraCurrentDB")
docid = session.GetEnvironmentString("IntegraUiDocID")

'Get a handle to the source database
Set db = session.GetDatabase(srv,pth,False)

If db Is Nothing Then
Exit Sub
End If

'Get a handle to the selected Notes document in the source database
Set doc = db.GetDocumentByunid(docid)

If doc Is Nothing Then
Exit Sub
End If

'Set the fields in the custom dialog to the value of a field in the source database
Call source.FieldSetText("FrmEmail",doc.email(0))


In the above code FrmEmail is the field in the dialog box, while doc.email(0) is picking data from the email field in the selected document.

.




FAQ# 0211
Bookmark and Share

 
QUICK LINKS
 
 

 

  © Shireburn Software Ltd. 2008 - 2024