我有一個窗體中的按鈕,帶來一個視圖的文件的選取列表...我的問題是我無法將所選文檔從選取列表設置到「Superior1」 .. plz幫助我..以下是click事件腳本...按鈕事件字段設置問題 - 蓮花腳本
Sub Click(Source As Button)
Dim session As New notessession
Dim view As NotesView
Dim view1 As notesview
Dim doc As notesdocument
Dim db As Notesdatabase
Dim Overdb As notesdatabase
Dim og As String
Dim Sup As String
Set db=session.CurrentDatabase
Set Overdb=session.GetDatabase(gsserver, "Master\\ASEAN_Staff.nsf")
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim picklist As Variant
Set uidoc = workspace.CurrentDocument
og = uidoc.FieldGetText("OfficeGroup_Key")
picklist = workspace.PickListStrings(PICKLIST_CUSTOM,_
False,_
gsserver,_
"Master\\ASEAN_Staff.nsf",_
"x_asean_superior1",_
"Select Name",_
"Choose",_
1,_
og)
If Isempty(picklist) Then
Exit Sub
Else
Set view = Overdb.GetView("x_asean_Superior1")
Set doc = view.GetdocumentByKey(picklist, False)
Sup=doc.ColumnValues(1)
Call uidoc.FieldSetText("Superior1", Sup)
End If
End Sub
PLZ糾正我,如果我錯了anywhr ......在從..一號文件被設置到領料單中選擇一個文件字段「Superior1」...我選擇的wateva沒有在字段中設置...
非常感謝你... mbonaci ... cwaidner ... Hristo ...它終於奏效了! :) – SarahXP
@mbonaci - 對。我在代碼缺少IsEmpty()檢查的同一主題上回答了[Sarah的另一個問題](http://stackoverflow.com/questions/5162450/button-click-event-lotus-script),所以我在這裏也提到了它,沒有注意到這裏的代碼已經有了這個檢查。 – Hristo