Hello,
I have an application where user creates a document, in which there are 2 fields. One of the Field1 is multivalue field, and has multiple people selection. Field1 can have user selection from 1 to 15 max. I have already executed an agent which will send an email to specific set of users defined in an array. But I am not sure how to work with dynamic array, because Field1 can have any number of values, I am not sure how to incoporate the changes for code which should pick value one by one from that dynamic array and send an email. Can any one guide me?
Thanks
MS
Subject: It is as simple as: mailDoc.Send(False, origDoc.Field1)
Subject: Not always … It is as simple as: mailDoc.Send(False, origDoc.Field1)
The use of [doc.fieldname] as the .Send parameter doesn’t always work. I don’t know if it’s Notes version-specific or not, but sometimes you can get a type mismatch error.
Another way to do what he wants is:
dim item as NotesItem
set item = origDoc.GetFirstItem(“field1”)
call mailDoc.Send(False, item.Values)
Subject: RE: Not always … It is as simple as: mailDoc.Send(False, origDoc.Field1)
If you have “Option Explicit” or “Option Declare” then you’ll get the Type Mismatch error. Assuming there is data present, just remove your Option statement and it will work.
Personally, I always use these Option statements. Just better code, imnsho.
Look into the LS ArrayAppend & relted array functions for quick and easy array management.
Collin
KC8TKA
Subject: RE: Not always … It is as simple as: mailDoc.Send(False, origDoc.Field1)
Thank you all for your responses. It is working now.
MS