Select values from view based on multiple categories

Let’s say I have two fields on a main form: SoldTo and ShipTo.

Now let’s say I have a separate form for supporting documents containing customer information. There are three sold-to customers. For each of those three, they each have 3 different ship-to’s associated with them (3 sold-to’s having 3 ship-to’s each = 9 total customer documents).

On my main form, in the SoldTo field, I present the user with a view to select which Sold-To(s) they want (can be multiple). Then when they go to make selections for the ShipTo field, I only a view to display those customer records for the SoldTo’s they selected.

For example, of the 3 sold-to’s available (X, Y and Z), they select sold-to’s “X” and “Y” for the SoldTo field. When they click the drop down for ShipTo, I want a view that only displays those customer records for sold-to’s “X” and “Y” (not “Z”).

Is this possible.

Subject: Found work around

I came up with a work around since I couldn’t get one view to display the docs only for the multiple categories.

What I ended up doing was having the user select the ship-to records by clicking on an action hotspot. What it does then is loop through each of the values selected in the SoldTo field and then doing a pickliststrings for each SoldTo value. It appends the choices to an array as they go. When they are done, it sets the ShipTo field value equal to all the values they selected.

Sub Click(Source As Button)

Dim s As New NotesSession

Dim uiws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim picklist As Variant

Dim shipList As Variant



Set db = s.CurrentDatabase

Set uidoc = uiws.CurrentDocument

Set doc = uidoc.Document



For x = 0 To Ubound(doc.SoldTo)

	picklist = uiws.PickListStrings(PICKLIST_CUSTOM,True,db.Server,db.FilePath,"Sold-To Profiles","Ship-To(s)","Please select one of more ship-to's for " + doc.SoldTo(x),2,doc.SoldTo(x) )

	

	If Isempty(shipList) Then

		shipList = picklist

	Else

		shipList = Arrayappend(shipList,picklist)

	End If

	

Next

doc.ShipTo = shipList

End Sub