I’m trying to move incoming e-mails to folders using agent and not getting lucky with the @AddToFolder.
To give you a little background…
We have mail-in db where analysts recieve trouble tickets from the help desk database. We’ve an agent in that notify analysts when new tickets arrive in the database. The analysts are notified in orderly manner; 1st ticket to Analyst_1 , 2nd ticket to Analyst_2 and so on. When the last analyst gets his ticket, the order starts over again. All these are working fine except that the when the agent runs the incoming e-mails are not moved into the Analysts folders. Is there anything I’m missing in the below code?
SequentialNumber := @Subset(@DbColumn(“” : “NoCache”;“”:“”; “LastNumber”; 1);1);
Incremented:=@If(SequentialNumber = -999; 0; !@IsNumber(SequentialNumber); 1; SequentialNumber + 1);
Count :=@Modulo(incremented;6)+1;@If(@IsError(tmp);0;tmp);
FIELD Incremented:=Incremented;
FIELD Count:=Count;
FIELD AgentFlag := “Y”;
message := “RE: New Ticket has been assigned to you. Please double click on the doclink to view the request.”;
@If(Count = 1; @MailSend(“Analyst_1”; “”; “”; “Ticket 1:”; message; “”; [IncludeDoclink]); “”);
@If(Count = 2; @MailSend(" Analyst_2"; “”; “”; “Ticket2: ticket”; message; “”; [IncludeDoclink]); “”);
@If(Count = 3; @MailSend(“Analyst_3”; “”; “”; “Ticket3: ticket”; message; “”; [IncludeDoclink]); “”);
@If(Count = 4; @MailSend(“Analyst_4”; “”; “”; “Ticket4: ticket”; message; “”; [IncludeDoclink]); “”);
@If(Count = 5; @MailSend(“Analyst_5”; “”; “”; “Ticket5: ticket”; message; “”; [IncludeDoclink]); “”);
@If(Count = 6; @MailSend(“Analyst_6”; “”; “”; “Ticket6: ticket”; message; “”; [IncludeDoclink]); “”);
@If(Count = 1; @AddToFolder(“1. Analyst_1”; “($Inbox)”); “”);
@If(Count = 2; @AddToFolder(“2. Analyst_2”; “($Inbox)”); “”);
@If(Count = 3; @AddToFolder(“3. Analyst_3”; “($Inbox)”); “”);
@If(Count = 4; @AddToFolder(“4. Analyst_4”; “($Inbox)”); “”);
@If(Count = 5; @AddToFolder(“5. Analyst_5”; “($Inbox)”); “”);
@If(Count = 6; @AddToFolder(“6. Analyst_6”; “($Inbox)”); “”);
Thanks in Advance!