I have a Vacation Requests form. The basic process is this:
Employee submits vacation request
Submit button then determines who is sent a notification for 1st approval. (It could be a number of managers, depending on which department, etc the employee is in)
1st approval person approves/rejects. If they approve, it is then sent to the HR Manager for review. She/he is sent an email telling them to review this.
HR Manager then decides if she will final approve this or if the President of the company will final approve. She clicks a button to make her selection.
Final approval person receives email notification
Final approval made - either approve or reject - either one triggers an email to be sent.
Now, my question is this. I have a number of managers who might be involved in the 1st approval process. These managers can change quite a bit depending on turnover/promotion, etc. As of right now, every time someone leaves our company or someone new starts, I have to go into every form to check over rows and rows of script to see where that person's email falls under and change it manually. (I use the Sendmail to trigger email notifications to be sent, based on rules.) Is there any way to create a report with the managers - say with the columns department manager, name and email address, and be able to change this report only to trigger where the emails are sent from each form?
An example of one of the sendmail functions that I use would be:
//If Vacation Request is from Toronto, Head Office - request is sent to HR for 1st approval. - shows link for HR Approve Leave
if (((input.Location == "Toronto") && (input.Department_text == "Head Office")) && !input.Employee.contains("Alana"))
{
sendmail
(
Subject : "New Vacation Request received"
Message : "Hi,<br>\n<br>\nYou have received a new Vacation Request from " + input.Employee + " in " + input.Location + ", " + input.Department_text + " - you can Approve/Reject this request <a href=\"[url here]">here</a>.<br>\n<br type=\"_moz\">"
)
}
Currently, I have three or four forms with sendmail functions like this in order to make my Vacation Request process work properly. It takes an incredible amount of time to go through and change everything, and with my mat leave coming up, I'm afraid things will fall apart even if I show someone else what they have to do.
Any help you can provide would be amazing. Thank you!