当您选择 aa 列时,我有一个显示行的按钮。但是我遇到了一个问题,因为它没有在该领域获得第二个价值。例如,我选择了生日列,但它有两个具有相同值的项目(例如 1990 年 1 月 1 日),它只显示字段中第一个项目的行,看不到第二个项目。你能帮助我吗?这是我的代码:
Sub Getvalue
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim printcolumn As String
Dim columnList() As String
Dim y As Integer
'-- print column --
For a = 0 To 10
setfield = "Untitled" & x
Set uidoc = ws.CurrentDocument
printfield = uidoc.FieldGetText(setfield)
Redim Preserve columnList(11)
columnList(a) = printfield
x = x + 10
Next
printcolumn = ws.Prompt(4,"Column List", "Select:", , columnList)
indexresult = (Arraygetindex(columnList, printcolumn)) + 1
'-- print row --
y = (indexresult*10) + 1
For b = 0 To 9
setrowfield = "Untitled" & y
Set uidoc = ws.CurrentDocument
printrowfield = uidoc.FieldGetText(setrowfield)
Redim Preserve rowList(10)
rowList(b) = printrowfield
y = y + 1
Next
printrow = ws.Prompt (4,"Row List", "", ,rowList)
'-- for duplicates --
Forall prow In columnList
If printcolumn = prow Then
indexresult2 = (Arraygetindex(columnList, prow)) + 1
z = (indexresult2*10) + 1
For b = 0 To 9
setrowfield = "Untitled" & z
Set uidoc = ws.CurrentDocument
printrowfield = uidoc.FieldGetText(setrowfield)
'Redim Preserve rowList(10)
rowList(b) = printrowfield
z = z + 1
'printrow = ws.Prompt(4,"Row List", "", ,rowList)
Next
printrow = ws.Prompt(4,"Row List", "", ,rowList)
End If
End Forall
End Sub