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
643 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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
 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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