列を選択すると行を表示するボタンがあります。しかし、フィールドで 2 番目の値が得られないという問題があります。たとえば、列の誕生日を選択しましたが、同じ値 (1990 年 1 月 1 日など) を持つ 2 つの項目があり、フィールドの最初の項目の行のみが表示され、2 番目の項目は表示されません。手伝って頂けますか?これが私のコードです:
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