@MailSend to a list

Hello,I’m trying to send a message to several people,for this i used an agent in wich i’ve put:

SELECT form =“incident_note”;

envoiA:=ServiceSupport;

copieA:=NULL;

copieCacheA:=NULL;

objet:=@GetProfileField(“$mail_notification”;“objet_notification”);

texte:=NULL;

corps:=@GetProfileField(“$mail_notification”;“corps_notification”);

@MailSend(envoiA;copieA;copieCacheA;objet;texte;corps;[IncludeDoclink])

and ServiceSupport is a calculated field getting data from a view:

@DbColumn(“”;“”;“intervenant”;1)

but it doesn’t seem to work!!

Can the field “copieA” have several items??

any ideas??

Subject: @MailSend to a list

For testing purposes I would send yourself a copy of the various fields to make sure you’re getting what your expect:

SELECT form =“incident_note”;

envoiA:=@DbColumn(“”;“”;“intervenant”;1);

copieA:=NULL;

copieCacheA:=NULL;

objet:=@GetProfileField(“$mail_notification”;“objet_notification”);

texte:=NULL;

corps:=@GetProfileField(“$mail_notification”;“corps_notification”);

@MailSend(envoiA;copieA;copieCacheA;objet;texte;corps;[IncludeDoclink])

body := " envoiA=[" + @Implode( envoiA, “,”) + “]” + @NewLine;

body := body + corps;

@MailSend(“Your Name/Sub/Org”; “”; “”; “The Details”; “”; body; [IncludeDoclink])

I’ve never done the SELECT inside an agent. Therefore, I have no idea if that might be causing an issue. I assume it will give a list of documents for the doclink. What happens if there is more than one? Do you get multiple doclinks.

Subject: @MailSend to a list

To assign multiple values in a field here is your guide;

variablename := value1:value2:value:and so forth

separable by colon

Subject: RE: @MailSend to a list

yes, we do this if we already know the values,but in my case i’m getting the values automatically by the formula @DbColumn.How can i do it then??

Subject: RE: @MailSend to a list

You must debug your formula and see what values are being passed to the function. Please read Debugging Domino Applications part 1 and part 2.

There’s nothing I can see wrong with this code, but there are other things outside the code that could mess it up. One thing I can think of offhand is that ServiceSupport doesn’t contain the value you think it does, at the time the formula is executed.

Incidentally, please don’t use NULL when you mean “”. NULL is not a special word in a formula, just a made-up name, like Sqwyzzyx. It’s blank because the field Null doesn’t exist.

Subject: RE: @MailSend to a list

I think the source of the error is this: field SendTo can only get value1:value2:value3(when you have a list)

but the @dbColumn returns value1;value2;value3

I think the problem is in the seperator

Subject: RE: @MailSend to a list

If row 1 contains value “A”, and row 2 contains value “B”, then @DbColumn returns “A” : “B”, not “A; B”. However, you’re not using @DbColumn in your formula, you’re reading the value from a field. The field may well have a delimited string in it, rather than a list, perhaps because you haven’t checked the box to make the field multivalued.

Use the debugging technique I posted links to in my last response, to find out what the actual value of the field is.