I am trying to fine tune an agent and am encountering a few problems.
I have been asked to include the delinquent employees name in the subject line.
The agent looks up to a field that contains the delinquent employees named FutureApprovers, it also looks up to a field named FutureApproversMgrs.
Both fields are multivalue text.
I have created a view also named (dblookup for reminder).Itred to do this by using the the following:Which added all the names in the futureapprovers field, I only want one name per notice.
FutureApprovers := FutureApprovers;
Overdue := Overdue;
ApprDate := @If(Apprdate = "" ; "" ; ApprDate);
SELECT Apprdate <= @Adjust(DueDate;0; 0; 7; 0; 0; 0) & Overdue = "First Notice" ;
@If(Overdue = "Second Notice" ; "";@Today >=DueDate;@SetField("Overdue";"Second Notice");"");
REM "Set the mailsend parameters";
SendTo := @If(FutureApprovers = "Approval Complete";""; FutureApproversMgrs);
Copyto := FutureApprovers ;
BlindCopyTo := null;
Subject := @Text(PDI_ID) +" "+"Overdue Approval Reminder for" + " " + FutureApprovers;
Remark := @Text(PDI_ID) +" "+" is Overdue, Please Complete the required PDI information" ;
Body := "";
REM "Mail the document";
@MailSend (SendTo; CopyTo; BlindCopyTo; Subject; Remark; Body; [IncludeDoclink])
James E Wood