Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


Sarah Flowers 16.Aug.17 03:24 PM a Web browser
Domino Designer All Releases All Platforms


Hello beautiful people. Have a rookie question that has me banging my head against the wall. Trying to loop a mail send using formula language and not getting it to work. Here's the situation:

I have to send reminder emails to supervisors whose employees haven't filed time sheets for the last pay period; one email to each supervisor with a list of the employees. I already have a handle on StartingDate, which is a text value. Here's my code:

{This gets me a list of the supervisors who have employees who haven't filed a time sheet. This works perfectly.}
sups:=@Unique(@DbLookup(""; ""; "LUPinkSheetStatus"; StartingDate; 2));

{This gets me a list of the employees who haven't filed a time sheet, but returns ALL employees, not one for each supervisor:}
emps:=@Unique(@DbLookup(""; ""; "LUPinkSheetStatus2"; StartingDate+sups; 2));

{Finally, this is the code that I was hoping would send an email to each supervisor with a list of just that supervisor's employees, but doesn't do a thing:}
Total:=@elements(sups);
@For(Counter:=1;
Counter<=Total;
Counter:=Counter+1;
emailaddr:=sups[i];
@MailSend(emailaddr;"";"";"Employees who haven't filed a time sheet for the period starting on "+StartingDate;"";@Implode(emps;@newline))

I'm thinking the employee list needs to be in a loop, too, but I can't get far. Any advice would be very much appreciated!






@mailsends in an @for loop (Sarah Flowers 16.Aug.17)
. . RE: @mailsends in an @for loop (Matt Pethig 16.Aug.17)
. . . . RE: @mailsends in an @for loop (Sarah Flowers 17.Aug.17)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite