Solved

I have a Lotus notes doc with a  text field that can have one, or multiple user names. I want to send an email to the people in that field

Posted on 2010-11-23
12
638 Views
Last Modified: 2013-12-18
Below is the code I have. It works fine if there is one name in the "coverage" field.
The coverage field is a txt field. If there are 2 or more names, each name is in quotes and the send to below sees it as one name with ,and then/


@PostedCommand([FileSave]);
@MailSend(coverage+"/";"";"";"Follow this link to a new Task";"";"This task has been submitted, and is not yet assigned ";[IncludeDoclink]);
@Command([FileCloseWindow])
0
Comment
Question by:Monterey
  • 6
  • 2
  • 2
  • +2
12 Comments
 
LVL 5

Expert Comment

by:RonaldZaal
ID: 34203267
Hello, is your text field multi value ?
And then try to play with @implode and @explode
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34203464
Which is the separator between the two names? Post example.
And what exactly is that slash used for?

Why don't you simply use Names field type?
And please, before all of the above, respond to the Ronald's question.
0
 
LVL 1

Expert Comment

by:nilanjansaha
ID: 34212624
it would be difficult for you to achive your goal through lotus formula, instead use lotus script for multiple receipient.
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34212635
That simply isn't true.
Why would it be difficult?
There's nothing more simple than putting a (multi-value) field name in place of SendTo parameter. That's it!
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34212652
The problem probably occurred, as Ronald said in his first post, because the field was not multi-value.

This is from Designer help:
@MailSend( sendTo ; copyTo ; blindCopyTo ; subject ; remark ; bodyFields ; [ flags ] )

Parameters:

sendTo
Text or text list. The primary recipient(s) of the mail memo.

Open in new window

0
 
LVL 1

Expert Comment

by:nilanjansaha
ID: 34215847
again what you are mentioning is true but the problem is with multi value field, which separates each value with a comma, semi-colen, new line or space and none of these separators are accepted by the mail send option as multivalue separator, which only accepts collen ":" as multivalue separator. other wise if there are three different single value field then those can be easily used with mail send formula option.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 22

Expert Comment

by:mbonaci
ID: 34215912
That is not how it works.
Multi-value field separator is defined for two specific purposes:
 1. which signs will separate the text that is entered by user
 2. how will the field present its values when you open a document

One correction though (surprisingly:)
When you get field values using field name you'll always get only the first value of the multi-value field.
So, in order to get the text list (with colon as the separator) use the @Implode function like this:

@Implode( fieldName; ":" )
0
 
LVL 11

Expert Comment

by:Sudhakar Kumar
ID: 34302907
Hey here is some examples I got for this command....hope this is helpfull as you need : separator to send emails to multiple person.

Examples: @MailSend

1.      This formula sends a memo to David Lee with a blind copy to Joseph Smith in Support. The memo is titled "Status Report," and its body contains the message "Sorry it's late!" plus the contents of the STATUS and PLANS fields from the current document. The document is mailed with the following options: it is signed, delivery confirmation is requested, and a return receipt will be sent when each recipient reads the memo. The recipients are listed using distinguished naming syntax (available to Release 3 users only). The copyTo information was omitted, and was replaced with the null string because additional arguments follow.
@MailSend("David Lee/";"";"Joseph Smith/Support";"Status Report"; "Sorry it's late!"; "STATUS":"PLANS"; [SIGN] : [DELIVERYREPORTCONFIRMED] : [RETURNRECEIPT])
 
2.      This formula sends a memo to Mary Tsen and to Joseph Smith in Support. The subject uses the text stored in the current document's TOPIC field, and the body of the memo draws from the COMMENTS field. The copyTo, blindCopyTo, and remark arguments were omitted, and were replaced with null strings because additional arguments still followed. The flags were omitted, but because no arguments followed their position, the null string was not needed.
@MailSend("Mary Tsen/":"Joseph Smith/Support";"";"";TOPIC;""; "COMMENTS")
 
3.      This formula sends a memo to Mary Tsen with the message "Follow this link" in the Subject field, and a link to the original document in the Body field.
@MailSend("Mary Tsen/";"";"";"Follow this link";"";"";[IncludeDocLink])
 
4.      This agent formula sends Martha O'Connell the contents of the Comments rich text field in a memo with the subject Feedback. The agent is triggered on an Action menu selection event and its target is the selected documents. The  formula implodes the multi-value Items field to include it as the remarks parameter.
@MailSend("Martha O'Connell/MA/Acme"; ""; ""; "Feedback"; @Implode(Items; ", "); "Comments")
0
 

Accepted Solution

by:
Monterey earned 0 total points
ID: 34776270
I have a lookup view for coverage(based on what subject the user picks a coverage person/person will be notified.)
@If(Categories!= "" & Tasktype  = "Task"; @DbLookup("Notes":"NoCache";"":"";"(h_ Application Coverage)";Categories;3);"")
In view were there are more than one person as coverage I have it listed as:
first last/mmi, John Doe/mmi, Jane  Doe/mmi, Casey Black/mmi

@MailSend(coverage;"";"";"Follow this link to a new Task";"";"This task has been submitted, and is not yet assigned ";[IncludeDoclink]);

This is the only way I could do it. Every other solution would only give me the 1st name on the list.
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34793867
I don't understand, what this lookup view has to do with mail send function?

@Imploding the multi-value field works for sure.

And why didn't you respond to our questions?
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34793886
It works without implode because it's probably not multi-value field, so it's already imploded in a single value...
We asked you more than once is your field multi-valued, because it normally should be for entering multiple names.
0
 

Author Closing Comment

by:Monterey
ID: 34829984
got around it without using implode
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now