Subject: RE: 3 arrays trick question challenge
Your data structures are not clearly defined, and your question is also vague. Do you have the sample data:
Array1: A, A, A
Array2: A, B:A, C:D:E
Array3: B, B:C, D:F:G
in one Notes document? In how many fields? Is “B:A” a multivalue item read from one field, or a string containing two names delimited by a colon?
Do you mean to do a certain amount of processing and then send one email to each person including all the notices that are specific to them? So that in processing all the above data, A would get just one email, B would get one, every letter would get just one?
Or do you mean to send one email to A about “Array1”, another email to A about “Array2”, one to B about Array2 and one about Array3, and so on?
Do you mean to send to all the people at once, or wait until the document reaches a particular state, e.g. in step 1 just send to A about array1 and array2, and B about array3, then in step 2 send email to A about array1 and array2, to B about array2 and array3, and to C about array3?
Is the body of the email supposed to be the same in each case, or does it matter whether you’re sending to someone just as a requester, versus as requester and implementer, vs. implementor only?
Perhaps it will help you to use a list of NotesDocuments with the recipient as key:
Dim emailList List As NotesDocument
where each list element is a NotesDocument which is the memo you are going to send. Now when you want to notify someone, you can check whether you already have started a memo to them. If not, create a new memo and put it in the list. In either case, add the notification text, doclink, whatever, to the memo. When all done, use Forall to iterate thru the list and send the memos.