FIELD SaveOptions:=1;
FIELD Stage:=Stage;
FIELD trequestor:=Requestor;
FIELD timplementor:=Implementor;
FIELD ttestperson:=TestPerson;
FIELD Counter:=“0”;
@SetField(“Counter”;“0”);
@Command( [EditDocument]; “1” );
@SetField (“Stage”; “Approved”);
@SetField(“SOMManagerApprovalDate”;@Today);
@SetField(“Implementor”; @Prompt([OkCancelEdit]; “Assign to:”; “Please assign this change…”; “”) );
@If(
(trequestor=ttestperson & trequestor=timplementor);@SetField(“Counter”;“1”);
(trequestor=timplementor);@SetField(“Counter”;“2”);
(trequestor=ttestperson);@SetField(“Counter”;“3”);
(timplementor=ttestperson);@SetField(“Counter”;“4”);
(trequestor!=ttestperson & trequestor!=timplementor);@SetField(“Counter”;“5”);
“”);
@If(Counter=“1”;
(@MailSend(Requestor;“”;“”;“Your Change Request # “+FSqNumber+” has been approved.” ; "The Change Request has been assigned to you. " +@NewLine+"You are also required to perform the testing. "+@NewLine+@NewLine+"Click on the doclink to view the following request: ";“ChangeTitle”+@NewLine+ChangeTitle;[IncludeDoclink]));
“”);
@If(Counter=“2”;
(@MailSend(Requestor;“”;“”;“Your Change Request # “+FSqNumber+” has been approved.” ; "The Change Request has been assigned to you. " +@NewLine+@NewLine+"Please contact the tester after the implementation. "++@NewLine+@NewLine+"Click on the doclink to view the following request: "+@NewLine+@NewLine;“ChangeTitle”+@NewLine+ChangeTitle;[IncludeDoclink]));
“”);
@If(Counter=“2”;
(@MailSend(TestPerson;“”;“”;“Change Request # “+FSqNumber+” has been assigned to you for testing.” ; " This change is to be implemented by " +Implementor+“,” +@NewLine+@NewLine+"You are only required to perform the testing for this change. "++@NewLine+@NewLine+"Click on the doclink to view the following request: "+@NewLine+@NewLine;“ChangeTitle”+@NewLine+@NewLine+ChangeTitle;[IncludeDoclink]));
“”);
@If(Counter=“3”;
(@MailSend(Requestor;“”;“”;“Your Change Request # “+FSqNumber+” has been approved.” ; “The Change Request has been assigned to “+Implementor+”.”+@NewLine+ +@NewLine+"You are also required to perform the testing. "+@NewLine+@NewLine+"Click on the doclink to view the following request: "+@NewLine+@NewLine;“ChangeTitle”+@NewLine+@NewLine+ChangeTitle;[IncludeDoclink]));
“”);
@If(Counter=“3”;
(@MailSend(Implementor;“”;“”;“Change Request # “+FSqNumber+” has been assigned to you…” ; “You are required to perform the work for this change request.”+@NewLine+@NewLine+"Click on the doclink to view the following request: ";“ChangeTitle”+@NewLine+@NewLine+ChangeTitle;[IncludeDoclink]));
“”);