0
열을 선택하면 행을 표시하는 버튼이 있습니다. 하지만 문제가 생겨서 현장에서 2 번째 가치를 얻지 못했습니다. 예를 들어 생일을 선택했지만 값이 같은 항목이 두 개 (예 : 1990 년 1 월 1 일) 인 경우 두 번째 항목을 보지 않고 필드의 첫 번째 항목 행만 표시합니다. 너 나 좀 도와 줄 수있어?Lotusscript : 다음 배열 색인을 얻지 못함
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
당신은 멋진 사람이야. 고마워요! – drayl