English 中文(简体)
布顿活动 实地设置问题——Lotus 字典
原标题:Button Event Field Setting Issue - Lotus Script

我有一顿语,可以带出一份观点文件一览表。 我的问题无法把从小名单中挑选的文件划入“Superior1”领域。 plz帮助我,下面是点击事件说明。

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就纠正我。 在从选人中挑选文件时,第1份文件已进入“Superior1”领域。

问题回答

从PickListString公司返回时,有一个阵列。 利用其在GetDocumentByKey的数值,使用选号(0)获得第一个条目。

When you re using last PickListStrings parameter to restrict documents in a pick list dialog to a category, you never specify 1 as the second to last param, since you don t even see the category (which is the first column) in a dialog.
Instead, to get first visible column use 2.

此外,在为此目的使用<代码>GetdocumentByKey时,将第二个参数定为。 真的(需要准确的对应文件,而不是引信搜索)。

我不理解一件事,如果你重新努力,我就不理解。

将从小名单中挑选的文件编为“Superior1”领域

为什么不把价值直接从PickListString那里转移。 仅具体列出在PickListStrings的栏号(见方言):

...
picklist = workspace.PickListStrings( PICKLIST_CUSTOM,_
False,_
gsserver,_
"Master\ASEAN_Staff.nsf",_
"x_asean_superior1",_
"Select Name",_
"Choose",_
2,_
og ) 

Call uidoc.FieldSetText("Superior1", picklist(0))

我不理解,为什么你在利用PickListStrings获得其任何(概览一栏)价值观时,会去找同一文件?

除mbonaci的回答外,还有一小小段:如果用户报到“Cancel”的方言,则方言中的一种变式是EMPTY。 在此情况下,如果试图查阅<代码>(0),就会产生错误。 为此,检查<代码>Is Empty (picklist),如确实,应做什么(Exit Sub等)。





相关问题
Lotus Notes - Export emails to plain text file

I am setting up a Lotus Notes account to accept emails from a client, and automatically save each email as a plain text file to be processed by another application. So, I m trying to create my very ...

Why does this LotusScript halt during a loop?

I am trying to write a LotusScript to control a motor. The script I have for reading the bits seem to work fine, but I wish to add a stop button. I have all the commands for making the device stop, ...

Share a LotusScript library between databases

Is it possible to create a LotusScript library in one database and then access it from another database? Without simply copying the library into each database that needs to use it. What I would like ...

Reading a remote URL in Domino LotusScript

I have a remote RSS feed which has to be transformed into Notes documents using LotusScript. I ve looked through the documentation, but I can t find how to open a remote URL in order to retrieve its ...

How to change a field value of a document (LotusScript)?

In a new LotusNotes form I have a computed-value field ("NewOrdProdUID") which is set correctly with the unique ID of another existing document. I want to change the value of the field "NewProdAvail" ...

What is the meaning of the small "6" on some Domino agents?

Some agents in an ancient Lotus Notes application has a difference in agent-enabled behaviour that I cannot explain: This is the agent list read in R7.0.3: Enabled agents in R7, notice the small &...

热门标签