RE: @mailsends in an @for loop Sarah Flowers 17.Aug.17 05:44 PM a Web browser Domino Designer All ReleasesAll Platforms
You are my hero, Matt! Here's the final code working exactly as it should. THANKS!!
sups:=@Unique(@DbLookup(""; ""; "LUPinkSheetStatus"; StartingDate; 2));
runday:=@Adjust(@Date(@TextToTime(EndingDate));0;0;3;0;0;0)
Total:=@Elements(sups);
@For(Counter:=1;
Counter<=Total;
Counter:=Counter+1;
emailaddr:=sups[Counter];
emps:=@Unique(@DbLookup(""; ""; "LUPinkSheetStatus2"; StartingDate+sups[Counter]; 2));
@If(@Today!=runday;@Return("");@MailSend(emailaddr;"";""; "Time sheets missingFor One or More Employees ";"";"Good morning. One or more of your direct reports's weekly time sheets have not yet been approved for for the pay period. Employees whose time sheets still requiring processing are: "+@newline+@newline+ @Implode(emps;@NewLine))))