@Mailsend Not Working In Combination With @If

The 1st section of code below with @MailSend alone works great. When I place the @MailSend inside of an @If Statement I get nothing. I have other code similar to this that is working and I can’t see any problems here. Any suggestions ?

@MailSend(“John Doe”;“”;“”;"Notification Of Supplier Update For “+PgmID+” - "+Desc;“The part for the “+PgmID+” - “+Desc+” has been updated. Please reference the appropriate attachment for details. Any questions should be directed to the proper Manager. You can review the changes by clicking on the icon below. “;””;[IncludeDoclink]);

@If(SupplierCode= “123 - New York”;

@MailSend(“Jack Doe”;“”;“”;"Notification Of Supplier Update For “+PgmID+” - "+Desc;“The part for the “+PgmID+” - “+Desc+” has been updated. Please reference the appropriate attachment for details. Any questions should be directed to the proper Manager. You can review the changes by clicking on the icon below. “;””;[IncludeDoclink]);””);

Subject: @Mailsend Not Working In Combination With @If

There could only be one reason that the mail didn’t get sent - i.e. SupplierCode != “123 - New York”.

I guess the SupplierCode is a DialogList field which have multiple selections, and for each selection there is a corresponding “alias”. In Notes Client, when you open the document, you probably see “123 - New York” as value in this field. However, if you look at the document property of the field, it will be the “alias” of the field, which could be “123” or “New York”, etc. So you need to specify the alias of the SupplierCode value in the @If formula for @MailSend to work.

Good luck!

Subject: RE: @Mailsend Not Working In Combination With @If

hu t - You nailed that. It’s exactly as you described. The field document properties showed the Supplier Code broken up as as “123 - New York” “NY”. (both parts showing)

Thanks for your help !