We help IT Professionals succeed at work.
Get Started

@ command if structure getting unmanageable

pratigan
pratigan asked
on
203 Views
Last Modified: 2015-07-17
Hello All,
I have this @ command If structure that started out small and has since been added onto and onto.  Now I'm getting an error the second time around on the approval button.(  This is the logic of an approval button on a request form)  There are potentially 3 approvers needed.  3rd if its an admin request.  the first pass through works fine but the second approval button bush gives a "sendto" not populated error.  This if structure is geting very tedious.  There has to be another way.  Please help !
Here is the if structure:
@If(HBXsec_host_type = "Administrator" & HBXsec_acceptance = "Acknowledgement not received" & HBXsec_super_dt != "";@Prompt([Ok];"Acknowledgement Not Received"; "Approving Manager MUST acknowledge that he or she accepts the defined terms of the access for the User.  Please Read the Terms of the access agreement and Select the Accept option.  The APPROVER takes responsibility for the users acceptance of the terms");
@Do(
@If(HBXsec_super_dt = "";
@Do(
@SetField("HBXsec_super_dt";@Today);
@MailSend(HBXsec_manager;"";"";"A New HBX Security Access Request has been created and is pending Manager Approval.";"";"Please click on the doclink listed here and review the request.  Choose either Approve or Reject to complete your action for this request.  " + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] ));

HBXsec_manager_dt = "";
@Do(
@SetField("HBXsec_manager_dt";@Today);
@If(@Contains(HBXsec_role;"ZEKE / ZEBB");
@MailSend("RDC Scheduling Administrators";"";"";"A New HBX Security Access Request has been created and requires ZEKE and or ZEBB attention.";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] );"");
@If(@Contains(HBXsec_role;"Cisco VPN");
@MailSend("RDC Data Security";"";"";"A New HBX Security Access Request has been created and requires Cisco VPN attention.";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] );"");

@If(HBXsec_host_type = "Administrator";
@MailSend(RDCsec_spcl_app;"";"";"A New HBX Security Access Request has been created and is requiring special admin Approval.  ";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Promote Request Doc Link =>  "; [IncludeDoclink] );
@MailSend("RDC Data Security";"";"";"A New HBX Security Access Request has been created for your Review and Processing.";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] )));

HBXsec_spcl_dt = "" & HBXsec_host_type = "Administrator";
@Do(
@SetField("HBXsec_spcl_dt"; @Today);
@If(@Contains(HBXsec_role;"ZEKE / ZEBB");
@MailSend("RDC Scheduling Administrators";"";"";"A New HBX Security Access Request has been created and requires ZEKE and or ZEBB attention.";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] );"");
@If(@Contains(HBXsec_role;"Cisco VPN");
@MailSend("RDC Data Security";"";"";"A New HBX Security Access Request has been created and requires Cisco VPN attention.";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] );"");
@MailSend("RDC Data Security";"";"";"A New HBX Security Access Request has been created and received Approval and is Pending Data Security Processing.  ";"";"Please click on the doclink listed here and review the request." + @NewLine + @NewLine + "Promote Request Doc Link =>  "; [IncludeDoclink] ));"");

@If(HBXsec_role = "LSS RDC Account";
@MailSend("Karen G Throckmorton/USA/CSC";"";"";"FYI... A New HBX Security Access Request has been created and is requesting LSS RDC Account userid type.";"";"Please click on the doclink listed here to view the request.   " + @NewLine + @NewLine + "Request Doc Link =>  "; [IncludeDoclink] );"");

@Command([FileSave]);
@Command([FileCloseWindow])))


Thank You !
Paul
Comment
Watch Question
IT Consultancy
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE