Help with List fields

Hello All,

I have three fields:

Field1 (11:22:33:44:55)

Field2 (111:222:333:444:555)

Field3 (Blue:Blue:Green:Red:White)

How can I select (11:22:111:222) for Blue

or

(44:444) for Red.

Values can be anywhere in a list.

Thank you

Dim Session As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView



Dim doc As NotesDocument

Dim CurrentCode As Variant

Dim w As New NotesUIWorkspace

Dim ix As Integer

Dim jx As Integer



Set db = session.CurrentDatabase

Set view = db.GetView( "Admin View" )

Set uidoc = w.currentdocument

Set doc = view.GetFirstDocument



Dim thisdoc As NotesDocument

Set thisDoc = uidoc.Document

GetSub = uidoc.FieldGetText( "Field1" )



While Not (Doc Is Nothing)

	ix = 1

	Forall x In doc.column3

		jx = 1

		Forall y In doc.column2

			If ix = jx Then

				Count = Count +1

				Dim Item As NotesItem

				Set item = thisDoc.GetFirstItem( "ListValue" )

				Call item.AppendToTextList(y)

				Call thisdoc.Save(True,True)

			End If

			jx = jx + 1

		End Forall

		ix = ix + 1

	End Forall

	Set doc = view.GetNextDocument( doc )

Wend

End Sub

Subject: Help with List fields

My post is an attempt to answer the question I think you asked, although glancing at your code, I’m not sure I’m getting what you’re asking. Also, your question explicitly used numeric lists for Fields 1 and 2, which is more work than text lists, but that’s what I’m assuming. Also note that I have not tested this code in any way. Since Formula language is often easier/faster/simpler for list processing:

input := “Blue”;

numcolors := @elements(Field3);

@for(i := 1; i <= numcolors; i := i + 1;

 @if(Field3[i] = input;

 result := @if(result = ""; Field1[i]; result : Field1[i]); ""));

@for(i := 1; i <= numcolors; i := i + 1;

 @if(Field3[i] = input;

 result := @if(result = ""; Field2[i]; result : Field2[i]); ""));