Your question is a little vague — could you please outline your requirements in more detail? (unless the previous answer below tells you what you need)
—–
Hi,
We can populate the values into the fields in the form by referring a view by using Lotus Script agent.
1. Create a form with 2 fields “RNum” and “Combination” which should get populated with the values from the view “Student Details” (where “RollNo” is the first sorted column of the view)
2. Write an agent “PopulateFields”
Option Public
Option Declare
Sub Initialize
Dim session As New NotesSession
Dim currdb As NotesDatabase
Dim currdoc As NotesDocument
Dim view As NotesView
Dim viewdoc As NotesDocument
Set currdb = session.CurrentDatabase
Set currdoc = session.DocumentContext
Set view = currdb.GetView(“Student Details”)
‘ trying to the fields RNum and Combination in the form with the values for the RollNo = 1870 from the view
Set viewdoc = view.GetDocumentByKey(“1870”, True)
If Not viewdoc Is Nothing Then
currdoc.RNum = viewdoc.RollNo(0)
currdoc.Combination = viewdoc.Combination(0)
Else
currdoc.RNum = “”
currdoc.Combination = “”
End If
End Sub
3. Call this agent as a WebQueryOpen
ALL THE BEST
Discuss This Question: 1  Reply