Friday, December 30, 2011

"Lotus Script" How to Put Values In Combo box

Step 1:

First, In my Knowledge there is no direct way for this Task. Make a field as hidden.

Step 2:

Get the values Dynamically, And put it in our hidden field using FieldAppendText with seperator "," .

Step 3:

After that, Using Combo box formula window Write a single line code as follow

"@Explode(HiddenFieldName;";")

Step 4:

Never forget one thing that is to check the property given Below...

Lotus Script code:

Dim ws As New
NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set
uidoc=ws.currentdocument
Dim ns As New NotesSession
Dim db As
NotesDatabase
Dim doc As notesdocument
Dim vw As
notesview
Dim vc As NotesViewEntry
Dim vec As
NotesViewEntryCollection
Set db=ns.CurrentDatabase
Set
vw=db.GetView("vwName")
Dim ab As
Variant
Dim str1 As String
ab=vw.GetColumnValues(0)
Forall
a In vw.GetColumnValues(0)
If str1=""
Then
str1=a
Else
str1=str1+","+a
End
If
End
Forall
Call uidoc.FieldSetText("test",str1)
Call
uidoc.Refresh

No comments:

Post a Comment